Looping Statement in PHP

Looping Statement in PHP

In this article, we will explain the Looping statement in PHP. The looping statement is used for a specific number of times with the condition. Following Looping Statements are used in PHP For Loop While Loop Do While Loop Foreach Loop Break and Continue Loop How to Print Div in PHP using For Loop Read […]
Read Full Article
Even Odd Program in PHP using For Loop

Even Odd Program in PHP using For Loop

In this article, you will learn Even Odd Program in PHP using For Loop <?php echo "even no. are-" ." "; for($i=1;$i<=100;$i++){ if($i%2==0){ echo '(' .$i .')' ." "; } } echo "<br>"; echo "odd no. are-" ." "; for($i=0;$i<=100;$i++){ if($i%2!=0){ echo '['.$i.']' ." "; } } ?> In the above program using two loopings. One for […]
Read Full Article
How to Create Auto Counter in PHP

How to Create Auto Counter in PHP

In this article, you will learn How to Create Auto Counter in PHP. counter.php <?php $fp=fopen("count.txt","r"); if(!($fp=fopen("count.txt","r"))) { die('file not found'); } else { $counter=(int)fread($fp,20); fclose($fp); $counter++; echo "you are visitor no.".$counter; $fp1=fopen("count.txt","w"); fwrite($fp1,$counter); fclose($fp1); } ?> count.txt file will store the numbers. How to Get Current Indian Time in PHP Check on Facebook
Read Full Article