note 40672 added to tutorial
| From: | javi at rn2 dot php dot net | Date: | Thu, 11 Mar 2004 02:00:59 +0000 |
| Subject: | note 40672 added to tutorial | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66601@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/tutorial.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40672
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40672&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40672&report=yes
Search -- http://master.php.net/manage/user-notes.php