php program to print alphabet pattern I

PHP program to print alphabet pattern I


PHP program to print alphabet pattern I

Example :-

<?php
echo "<pre>";
for ($row = 0; $row < 11; $row++)
  {
for ($col = 0; $col <= 11; $col++) {
        if (($col == 5 and
($row != 0 and $row != 10)) or
(($row == 0 or $row == 10) and
($col > 1 and $col < 9)) or
  ($col == 9 and ($row == 0 or $row
  == 10))) {
            echo "I";
            //only change the echo
            //value "*" than display
            //tha * structure.
        } else {
            echo "&nbsp;";
        }
    }
    echo "<br>";
}
echo "</pre>";
?>
PHP program to print alphabet pattern I

Output :-

php program to print alphabet pattern I


Related  Post :-

php if else statements

php string operators

php program to print inverted left half pyramid pattern

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example