Im trying to nest java script in a php echo tag. Im getting this error
Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’
How can i nest that java script in that echo tag properly?
if($rowCount%5===0) {
echo '</table><br/><br/><script type='text/javascript' src='http://ads.com'></script><br/><br/><table align="center" width="70%"><tr>';
$rowCount = 0;
}
your quote is not escaped yet. escape your ‘ string with \’