Jump to content

PHP Tags


davidf85

Recommended Posts

There is no separation of  stuff between tags.  You can imagine that all the different blocks get squished together into one giant script, and anything that was outside the tags is just turned into an echo.

 

Eg:

<?php
$db = mysql_connect();
//do stuff
?>
<p>echo some
<br>
html here
</p>
<?php
$q = mysql_query();
//do more stuff
?>

 

is functionally equivilent to:


<?php
$db = mysql_connect();
//do stuff

echo '<p>echo some
<br>
html here
</p>
';

$q = mysql_query();
//do more stuff
?>

 

Link to comment
https://forums.phpfreaks.com/topic/257244-php-tags/#findComment-1318602
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.