Echo HTML tags with attributes
This code is fine :
<?php
echo "<div>Hello world!</div>";
?>
This code produces an error :
<?php
echo "<div id="test">Hello world!</div>";
?>
It says
Parse error: syntax error, unexpected 'test' (T_STRING), expecting ',' or ';'
Why is that?
No comments:
Post a Comment