Jump to content

php css problem


justinh

Recommended Posts

 
echo "<div id=\"category" onclick=\"location.href=default.php?catid".$cats['cat_id'].";\"><b>".$cats['cat_name']."</b><br>
       <small>".$cats['cat_description']."</small></div></div></div></body></html>";

 

gives me an error of

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /homepages/29/d119570661/htdocs/wmptest.com/clintormscart/default.php on line 36

 

 

so im pretty sure its the semi-colon used to end the css statement. How would I put a semicolon in a php statement? thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/135681-php-css-problem/
Share on other sites

<?php

echo "<div id=\"category\" onclick=\"location.href=default.php?catid".$cats['cat_id'].";\"><b>".$cats['cat_name']."</b><br>
       <small>".$cats['cat_description']."</small></div></div></div></body></html>";
?>

 

Make sure you escape all the quotes you need to ;)

Link to comment
https://forums.phpfreaks.com/topic/135681-php-css-problem/#findComment-706911
Share on other sites

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.