Jump to content

synyax erorr


conan318

Recommended Posts

echo '<a href="viewprofile.php?username='.$info['username'].'"><img src='http://datenight.netne.net/images/".$info['img']."'  title='".$info['username']."' width='50' height='50'></a>';

 

im struggling with quotes driving me crazy can someone tell me where a good place to learn how to use quotes in php and help with this line of code.

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

Link to comment
Share on other sites

<div class="random_frame">
<div class="random_user">


<?php
echo "<a href=\"viewprofile.php?username={$info['username']}\"><img src=\"http://datenight.netne.net/images/{$info['img']}\"  title=\"{$info['username']}\" width=\"50\" height=\"50\"></a>';
?>
</div>

 

just tryed it but it seems to ignore the closing of the php?

 

Link to comment
Share on other sites

Do

<?php
echo "<a href='viewprofile.php?username={$info['username']}'><img src='http://datenight.netne.net/images/{$info['img']}'  title='{$info['username']}' width='50' height='50'></a>";
?>

 

No escaped double quotes. Much cleaner IMHO.

 

Ken

Link to comment
Share on other sites

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.