note 40672 deleted from tutorial by nlopess
| From: | nlopess@php.net | Date: | Thu, 11 Mar 2004 14:50:51 +0000 |
| Subject: | note 40672 deleted from tutorial by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66636@lists.php.net to get a copy of this message | ||
Note Submitter: javi
----
Two ways of using php that you can combine. (It is good to know that you can use both of them. This
is something that people forgets when starting using php).
With these two examples you get the same result.
Example1.php
==============================================
<?php
echo "<html>";
echo "<head>";
echo "<title>Two ways of using php</title>";
echo "</head>";
echo "<body>";
echo "<BR><BR>";
echo "<b>PHP snippet code generation html</b><br><br>";
echo "<table border=\"1\">";
for($z=0;$z<=5;$z++)
{
echo "<tr><td>";
echo "Iteration number ".$z."<br>";
echo "</td></tr>";
}
echo "</table>";
echo "</body>";
echo "</html>";
?>
=============================================
*********************************************
Example2.php
=============================================
<html>
<head>
<title>PHP Example</title>
</head>
<body>
You can combine html and php
<BR><BR>
<b>PHP snippet code generation html</b><br><br>
<table border="1">
<?php
for($z=0;$z<=5;$z++)
{
?>
<tr><td>
<?php
echo "Iteration number ".$z."<br>";
?>
</td></tr>
<?}?>
</table>
</body>
</html>
==============================================
http://perkeler.biz