Sunday, 9 June 2013

What are looping statements in php?


Example -
We have 4 looping statements in PHP.
  1. for
  2. for each
  3. while
  4. do…..while

Code and Syntax

<?php
$x=array("one","two","three");
foreach ($x as $value)
  {
  echo $value . "<br>";
  }
?>

Explanation




 For more php questions and answers, dumps,tutorials for beginners and experienced people visit http://www.top-php-interview-questions.blogspot.in  If you find any errors while executing this program, you can make your comments or mail me at reply2sagar@gmail.com



No comments:

Post a Comment