Padgoi Posted October 9, 2008 Share Posted October 9, 2008 I am getting a PHP error: echo "<a href=\"#" onclick=\"toggle_visibility('foo');">"; echo "<img src=\"http://forum.wootability.com/CE.png">"; echo "</a>"; echo "<div id="foo">"; $row['ratings'] = $this->ipsclass->compiled_templates['skin_topic']->ratings( $row['pid'] , $row['author_id'] , $ratingshtml ); echo "</div>"; Link to comment https://forums.phpfreaks.com/topic/127762-what-is-wrong-with-this/ Share on other sites More sharing options...
GingerRobot Posted October 9, 2008 Share Posted October 9, 2008 I am getting a PHP error: Any chance of you being a bit more descriptive? Like, you know, telling us what the error actually is and which line it corresponds to? I'm afraid i used to be clairvoyant, but i've gone blind. Link to comment https://forums.phpfreaks.com/topic/127762-what-is-wrong-with-this/#findComment-661319 Share on other sites More sharing options...
aebstract Posted October 9, 2008 Share Posted October 9, 2008 You put a \ in front of 2 " and not all of the rest inside your echo. Should be: echo "<a href=\"#\" onclick=\"toggle_visibility('foo');\">"; echo "<img src=\"http://forum.wootability.com/CE.png\">"; echo "</a>"; echo "<div id=\"foo\">"; $row['ratings'] = $this->ipsclass->compiled_templates['skin_topic']->ratings( $row['pid'] , $row['author_id'] , $ratingshtml ); echo "</div>"; Link to comment https://forums.phpfreaks.com/topic/127762-what-is-wrong-with-this/#findComment-661324 Share on other sites More sharing options...
F1Fan Posted October 9, 2008 Share Posted October 9, 2008 Yes, please list the error. But, I do see a number of double quotes that are missing their backslashes. Example: echo "<a href=\"#" onclick=\"toggle_visibility('foo');">"; should be echo "<a href=\"#\" onclick=\"toggle_visibility('foo');\">"; Link to comment https://forums.phpfreaks.com/topic/127762-what-is-wrong-with-this/#findComment-661325 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.