19 June 2009

php code inside HTML tag

The following code creates list with the elements of an array. The blue colored code segments deserves attention.

<html>
<body>
<?php
$arr = array("Sim","Sum","Shis");
$count = 0;
?>

<ul>
<?php while($count < count($arr)) :?>
<li> <?php echo $arr[$count]; $count++; ?> </li>
<?php endwhile;?>
</ul>

</body>
<html>

0 Comments:

 

© 2007 t!ps n tr!cks: php code inside HTML tag



Template unik dari rohman


---[[ Skip to top ]]---