php loop to print alphabet pattern T
php loop to print alphabet pattern T
Example :-
<?php
echo "<pre>";
//loop for row
for($row=0;$row<6; $row++){
//loop for column
for($col=0;$col<=7;$col++)
{
//condition determine print echo '*'
value
if($col==3 or ($row==0 and $col>0 and
$col<6))
echo "*";
//print condition met
else
echo " ";
//if condition
}
echo "<br>"; }
echo "</pre>";
?>
Post a Comment