Jump to content

whats wrong with this??? RESOLVED


almightyegg

Recommended Posts

[code=php:0]
    echo "<a href=http://www.lordoftheabyss.com/player/view.php?id=$player[id]>stripslashes($r['username'])</a>"; ?>
[/code]

i get this error  ???
[quote]
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/lordofth/public_html/forum/viewthread.php on line 154
[/quote]

is it to do with the stripslashes??
Link to comment
https://forums.phpfreaks.com/topic/26358-whats-wrong-with-this-resolved/
Share on other sites

Hi

Second post :P

This is better
[code]
<?php
echo "<a href=\"http://www.lordoftheabyss.com/player/view.php?id=" . $player[id] . "\">" . stripslashes($r['username']) . "</a>";
?>
[/code]

You cannot include code in an echo without using end quots or " (sorry don't know the right word).

So the upper example would be correct... (think so)

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.