Pyramid in PHP Part IV
<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($k=$i;$k>0;$k–) { echo “*”; } echo “<br/>”; } ?> Output: * ** *** **** *****
<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($k=$i;$k>0;$k–) { echo “*”; } echo “<br/>”; } ?> Output: * ** *** **** *****
<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($k=$i;$k>0;$k–) { echo $i; } echo “<br/>”; } ?> Output: 1 22 333 4444 55555
<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($k=1;$k<=$i;$k++) { echo $k; } echo “<br/>”; } ?> Output: 1 12 123 1234 12345
<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($k=$i;$k>0;$k–) { echo $k; } echo “<br/>”; } ?> Output: 1 21 321 4321 54321
Object Oriented Programming is all about to create a modular structure for your applications. Whether your application is web based or desktop based application, OOP is a design concept with which you can create a modular code structure. Most important...
Object Oriented Programming is the approach to group all the variables and functions of a particular functionality/topic in a single class. As compared to procedural programming style, Object Oriented Programming is considered to be fast, advanced, and efficient. We may...