Solved: Contantination - PHP

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

knight_47

Thread Starter
Joined
Mar 14, 2006
Messages
941
I've been working in a new script, and I was trying to use the . in php, but had some problems.

PHP:
$url = "<center><FONT FACE=\"sans-serif, Arial, Helvetica, Geneva\" SIZE=\"6\"><a href=\"$raw_url\" target=\"_blank\">$raw_url</a></FONT></center>";
The above code is what I currently have implemented in one of my scripts, I would assume it would come up with an error because I'm combining php with html, but it did not.

So what I'm asking, what would be the correct way to output that line above, with contamination, I know the above code works, but is it not recommended or does it not even matter?

script: www.knight47.com/link_sharer

Thanks again.
 
Joined
Jul 8, 2002
Messages
14,681
Are you looking for the concatenation operator?
PHP:
$url = '<center><FONT FACE="sans-serif, Arial, Helvetica, Geneva" SIZE="6"><a href="' . $raw_url . '" target="_blank">' . $raw_url . '</a></FONT></center>';
 

knight_47

Thread Starter
Joined
Mar 14, 2006
Messages
941
Oops concantenation, lol, I thought it was contantination.

Yes that's what I wanted though, thanks B.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top