php program print square number pattern

 
php program print square number pattern

php program print square number pattern 

Example :-

<?php
echo "<pre>";
//define the number of rows
$rows =5;
//loop each row
for($i=1;$i<=$rows;$i++){
echo "&nbsp;&nbsp;";
//loop each colum
for($j=1; $j<=$rows;$j++)
{
    echo $j*$j." ";
}
echo "</br>";
}
echo "</pre>";
?>


php program print square number pattern 

Output :-

php program print square number pattern


Related Post :-

css border property

html datatime picker

html paragraph tag

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example