Search
 
SCRIPT & CODE EXAMPLE
 

PHP

while loop php

<?php
	$a = 0;
	while($a<=5){
    	echo $a."<br>";
      $a++;
    }
  ?>
Comment

do while php


<?php
$i = 0;
do {
    echo $i;
} while ($i > 0);
?>

Comment

PHP do while Loop

<?php
$x = 1;

do {
  echo "The number is: $x <br>";
  $x++;
} while ($x <= 5);
?>
Comment

While Loop PHP

<?php
$i = 0;
while($i<10)

{

echo $i;

echo "<br>";

echo $i++;

}

?>
Comment

PHP while Loop

<?php
$x = 1;

while($x <= 5) {
  echo "The number is: $x <br>";
  $x++;
}
?>
Comment

while loop php

<?php
include '../config/config.inc';
$sql = "SELECT TOP(1) * FROM assembly_armatureassy_tbl";
$data = array();
$query = mssql_query($sql);
while($result = mssql_fetch_array($query)){
$data[] = array(
'date' => $result['date'],
'shift' => $result['shift'],
'relay_type' => $result['relay_type'],
'quantity' => $result['quantity'],
'operator_name' => $result['operator_name'],
); 
}
echo json_encode($data);
?>
Comment

while in php

<?php 
  	$limit = 100;
	for($counter,$counter<=$limit;$counter++){
      // code
    }
  ?>
Comment

do-while loops in php

<?php
$i = 0;
do {
    echo $i;
} while ($i > 0);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: php cheatsheet 
Php :: laravel sortby relationship column 
Php :: prevent xss php 
Php :: how to insert date in mysql using php 
Php :: join array in php as string 
Php :: program logic for second largest number in an array in php 
Php :: brew install php 5.6 
Php :: echo all php global variables 
Php :: php imagick xampp windows 
Php :: how to retrieve image from database in php mysqli 
Php :: add foreign key in laravel migration 
Php :: codeigniter 4 limit query 
Php :: reset array keys php 
Php :: php Calculate the number of months between two dates 
Php :: multiple selected checkbox values in database 
Php :: laravel 6 tymon/jwt-auth 
Php :: laravel form old value array 
Php :: php-curl 
Php :: get deleted value laravel 
Php :: laravel job delay dispatch 
Php :: php implode keys 
Php :: Laravel assets url issue 
Php :: laravel pluck relationship 
Php :: laravel 8 eloquent orderby 
Php :: php artisan storage:link not working 
Php :: get next month first day php 
Php :: laravel routes return view in web.php 
Php :: post params in body laravel 
Php :: date time in php 
Php :: how to add share icon in wordpress 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =