Have an account? Sign in
Login  Register  Facebook
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
Quick Table of Contents
[Edit] Embedding Multiple Code Blocks
You can escape to and from PHP as many times as required within a given page. For instance, the following example is perfectly acceptable:
<html>
<head>
<title><?php echo "Welcome to my web site!";?></title>
</head>
<body>
<?php
$date = "July 26, 2010";
?>
<p>Today's date is <?=$date;?></p>
</body>
</html>
As you can see, any variables declared in a prior code block are remembered for later blocks, as is the case with the $date variable in this example.
September 21, 2011