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 :: migration status php 
Php :: wp enqueue style for style.css 
Php :: php multi type parameter php multi type parameter 
Php :: Auth::routes(); why display error in route laravel 8 
Php :: get random data laravel 
Php :: Invalid argument supplied for foreach() 
Php :: PHP Warning: Version warning: Imagick was compiled against Image Magick version 1654 but version 1650 is loaded. 
Php :: sortbydesc on a collection laravel 
Php :: php session get data 
Php :: array_key_exists vs isset 
Php :: php two decimal places 
Php :: carbon two day ago 
Php :: Auth log out laravel 
Php :: laravel eloquent get column 
Php :: explode in php 
Php :: php include files 
Php :: get array key php 
Php :: Array and string offset access syntax with curly braces is deprecated in tcpdf.php 
Php :: Laravel - Comparison betweeon two column values - whereColumn 
Php :: laravel add item to array 
Php :: query-data-from mysql and php 
Php :: How to display image from aws s3 in laravel blade 
Php :: Carbon Add Days To Date In Laravel 
Php :: javascript php loop 
Php :: php array longest string 
Php :: php loop through array of objects 
Php :: table has column laravel 
Php :: separate date from datetime php 
Php :: pass variable to another page in js 
Php :: php line break in echo 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =