php interview question with answer write a code to print pyramid

technical talkiess
0

* print code in php

 asterick print code in php

php question interview 

php interview question with answer write a code to print pyramid 

 


<!DOCTYPE html>

<html>

<body>


<?php

for($i=1;$i<=5;$i++){

    for($j=1;$j<=$i;$j++){

    echo "*";

}

echo "</br>";

}


?> 


</body>

</html>

Output:-

*
**
***
****
*****

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)