Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.