View Single Post
Old 01-30-2013, 08:58 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Yep, that's normal behaviour.
PHP code is pre-processed on the server, and the results are sent to the client. The client then interprets it. Typically, this is used in a web environment, so PHP generates the dynamic content and sends the results in HTML:
PHP Code:
<?php

if (date("a") == "pm")
{
    
$sPartOfDay "evening";
}
else
{
    
$sPartOfDay "morning";
}

printf('<p>good %s</p>'$sPartOfDay);
?>
Would be the PHP code, and what the browser sees is:
Code:
<p>good afternoon</p>
or good morning if its 'am'. So what you see in the browser is only what is printed or echo'd to the browser, or anything outside of <?php and ?> tags.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
flashawd (01-31-2013)