Category: Web Development

File upload in CakePHP 3 using Cake Bake

In our last article, we explained how to use cake bake command for a basic CakePHP application. There is no CakePHP internal library to upload files, so we need to use core PHP’s function move_uploaded_file() to upload file/files to the...

Install and Configure GIT

Install and Configure Git on Windows

In our last articles, you read about version control, introduction to Git, and why Git is important to your organization. We hope you all get the idea about Git. To start using Git you need to first install it. For...

PHP Pyramid Part 12

PHP Pyramid Part XII

<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($j=$limit;$j>=$i;$j–) { echo “&nbsp;&nbsp;”; } echo “1”; for($x=1;$x<=$i;$x++) { echo “0”; } echo “1”; echo “<br/>”; } ?> Output: 11 101 1001 10001 100001 1000001  

PHP Pyramid Part 11

PHP Pyramid Part XI

<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($j=$limit;$j>=$i;$j–) { echo “&nbsp;&nbsp;”; } for($x=0;$x<=$i;$x++) { if($x==0) { echo “1”; continue; } echo “0”; } echo “<br/>”; } ?> Output; 1 10 100 1000 10000 100000  

PHP Pyramid Part 10

PHP Pyramid Part X

<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($j=$limit;$j>$i;$j–) { echo “&nbsp;&nbsp;”; } for($k=$i;$k>0;$k–) { echo “*”; } echo “<br/>”; } ?> Output: * ** *** **** *****  

PHP Pyramid Part 9

PHP Pyramid Part IX

<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($j=$limit;$j>$i;$j–) { echo “&nbsp;&nbsp;”; } for($k=$i;$k>0;$k–) { echo $i; } echo “<br/>”; } ?> Output: 1 22 333 4444 55555