Jump to content

Where do i insert this tag?


Modernvox

Recommended Posts

echo "<a href=\"$url{$post[1]}\" target=\"_blank\">{$post[2]}<font size=\"3\">{$post[3]}</font></a><br />";

 

What was most likely happening is that the target you posted is using Smart Quotes and not straight, those do not get parsed correctly and tend to cause errors.

echo "<a href=\"$url{$post[1]}\" target=\"_blank\">{$post[2]}<font size=\"3\">{$post[3]}</font></a><br />";

 

What was most likely happening is that the target you posted is using Smart Quotes and not straight, those do not get parsed correctly and tend to cause errors.

 

Thanks Presimo that worked, but what is the reason for the / ?

its a way of parsing the double quotes!

 

To put that statement in more correct terms, it escapes the double quote since you are in double quotes as if you do not there will most likely be a syntax error. Alternatively you could do this:

echo '<a href="' . $url . $post[1] . '" target="_blank">' . $post[2] . '<font size="3">' . $post[3] . '</font></a><br />';

 

And not have to escape any quotes. But either way works fine.

its a way of parsing the double quotes!

 

To put that statement in more correct terms, it escapes the double quote since you are in double quotes as if you do not there will most likely be a syntax error. Alternatively you could do this:

echo '<a href="' . $url . $post[1] . '" target="_blank">' . $post[2] . '<font size="3">' . $post[3] . '</font></a><br />';

 

And not have to escape any quotes. But either way works fine.

 

Yeah, this way looks alot more organized.

Thanks again, Presimo

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.