Posts

Write Below Pattern Using for loop Coding & Print Pattern in Php.

Output of Print Pattern * ** *** **** ***** ****** ***** **** *** ** * Php Print Pattern Code in Below   <?php  for($i=0;$i<=6;$i++) {    // echo $i;    for($j=0;$j <$i;$j++)    { echo "*";     } echo "<br>";  }  for($i=4;$i >=0; $i--) { for($j=0;$j <= $i;$j++)     { echo "*";     }     echo "<br>";  } ?> This program is print the follows pattern using the for loop use print the two main for loop and two are sub for loop and this logic is we create the first loop is started 0 to 6 and other is start 4 to 0 so it will print the above pattern.
***** ***** ***** ***** ***** <?php  for ($i=1; $i <=5 ; $i++) {  # code.e.. for($j=0;$j <5; $j++){   echo "*";   } echo "<br>"; } ?> This php script is used to print the above pattern it will like one box. in this output we will used the for loop.   This code we used two different for loop .one loop is start form  1  and go to 5 all time it will increment.   Second loop is call inside the main loop it will also start with 0 and goes to 5  after we print the inside loop * only .    last we used to break the link using "<br>" Thanks Vips the dev
* *  * *  *  * *  *  *  * *  *  *  *  * *  *  *  *  *  * *  *  *  *  * *  *  *  * *  *  * *  * * <?php for ($i=1; $i <=6; $i++) {  # code... echo "*"; for ($j=1; $j <$i ; $j++) {  # code... echo "*"; } echo "<br>"; } for ($i=5;$i >=1; $i--) {  # code... echo "*"; for ($j=1; $j < $i; $j++) {  # code... echo "*"; } echo "<br>"; }  ?> This out put is print pyramid In PHP .This code is using for loop to print out put it print good output. in this program main two for loop are there and inside one loop one more sub for loop are there.  First for loop is print upper first 6 line, as * and i will work as start to 1 and goes to 6 and increment to as 6. inside sub for loop is print start form 1 and goes to last as $i value for main loop also it increment. and ...
* * * * * * * * * * * * * * * Program in php <?php for ($i=1; $i<=5 ; $i++) {  echo "*"; for($j=1;$j<$i;$j++){ echo "*"; } echo "<br>"; } ?> This output return using for loop  in this output we return only * as pyramid. It will work as start 1 to goes to 5 number as first  loop like 1,2,3,4,5 and all this number are print in line because we have use <br> tag in last.        Now second loop is execute second time it will start as 1 and goes to last stop of $i value and increment every  time like 1,12,123,1234 etc.       This php code we print only star so we use only for echo "*", it will  print above pattern. Vips The Dev. Thanks.      
1. Write a program for this pattern ? * * * * *  * * * *  * * *  * *  * Example Code for ($i=5; $i>0; $i--) {  for ($j=0; $j < $i; $j++) {  echo "*"; } echo "<br>"; } This output is print using for loop and it will first starting form 5 and decrements to 1 inside use the second loop is also the for .loop it will stating form 0 and goes to length  above loop last stop increment to end  of the length. it will coun.5,4,3,2..... Thanks
Advantage of PHP                                     PHP   is a server site scripting language. It is Open source scripting language.widely use in all the world.                         Advantages of PHP                                                                             Open source                                      Speed                                      Easy to use                ...
What IS PHP? =>Full Form  Hypertext Preprocessor        PHP Is a server side scripting Language. create and making the dynamic website and web page  used as a Programming Purpose.        PHP Is very easy and simple to Learn .It Also Open source to All So any One can be Leran.  not need to pay anything for use Php.IT also Faster than Other Scripting Language like Asp,Jsp etc      PHP data is  encrypt   and very  security they also set the particular Sessions and Cookies.they also  integrated with Number of Database and make the Dynamic website.        PHP  developed by Rasmus Lerdorf in 1994 that time only use for tracking purpose.Now Dayn the Use LOTS in IT sector.and Communication  with Internet.   Prerequisites    Before learning this php we must be basic knowledge of Html, css, javascript, ajax...