Can someone help me to arrange the quotation marks cause i got the error,
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'
echo "<tr class='d0' onmouseover='Changecolor(this, true);
' onmouseout='ChangeColor(this, false);
' onclick='DoNav(""view_place1.php?id=".$row['id'].""; ");
' style='cursor:pointer'>";
Thanks in advance.
Help in arranging quotation marks:D
Moderator: General Moderators
-
truce enough
- Forum Newbie
- Posts: 8
- Joined: Fri Sep 02, 2011 12:53 am
Re: Help in arranging quotation marks:D
First of all, please use php code tags.
If you want to put quotation marks in string that is enclosed with quotation marks you need to escape them by \, meaning:
Please read the PHP manual for further details:
http://php.net/manual/en/language.types.string.php
If you want to make the string easier to read, you can split it with a dot:
If you want to put quotation marks in string that is enclosed with quotation marks you need to escape them by \, meaning:
Code: Select all
echo "<tr class='d0' onmouseover='Changecolor(this, true);' onmouseout='ChangeColor(this, false);' onclick='DoNav(\"view_place1.php?id= " . $row['id'] . "\");' style='cursor:pointer'>";
http://php.net/manual/en/language.types.string.php
If you want to make the string easier to read, you can split it with a dot:
Code: Select all
echo "<tr class='d0' onmouseover='Changecolor(this, true);'" .
" onmouseout='ChangeColor(this, false);'" .
" onclick='DoNav(\"view_place1.php?id= " . $row['id'] . "\");'" .
" style='cursor:pointer'>";
-
truce enough
- Forum Newbie
- Posts: 8
- Joined: Fri Sep 02, 2011 12:53 am
Re: Help in arranging quotation marks:D
Thanks a lot! its is finally solved!!