PHP Tutorial

PHP Home

PHP Functions

PHP String Functions

PHP Interview Programs

PHP Common ProgramsPHP Array ProgramsPHP Converter ProgramsPHP Star Patterns ProgramPHP Number Patterns ProgramPHP Alphabet Patterns Program

PHP Reference

ASCII Table

PHP Number Pattern 48

Last Updated:

PHP Number Pattern 48

Try to print the following number pattern using PHP.

Print This Output
1
11
121
1331
14641

Source Code

PHP Compiler
<?php $k = 1; for($i=1; $i<=5; $i++) { if($i == 1) $k = $i; else $k = $k * 11; echo $k; echo "<br>"; } ?>

Share this Page

Meet the Author