php loop to print alphabet pattern V


php  loop  to print alphabet pattern V


php  loop  to print alphabet pattern V

Example :-

<?php
echo "<pre>";
//loop for row
for($row=0;$row<7; $row++){
    //loop for column
    for($col=0;$col<=7;$col++)
    {
        //condition determine print echo '*'
value
       if((($col==1 or $col==5) and $row <5)or
       ($row==6 and $col==3)or ($row==5 and
($col==2 or $col ==4)))  
        echo "*";
                //print condition met
           
           else
            echo "&nbsp;";
        //if condition
           }          
    echo "<br>"; }

echo "</pre>";
?>

php  loop  to print alphabet pattern V

output :-

php  loop  to print alphabet pattern V


Related Post :-

php string operators

css text decoration

inline css in html

Comments

Popular posts from this blog

What Is CSS Text Color in 2026

CSS Padding Property Explained

CSS Outline Color Property in 2026