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

do-while loops in php

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

while in php

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

PREVIOUS NEXT
Code Example
Php :: for each php 
Php :: what is scalar data type in php 
Php :: php filter array contain valu 
Php :: offset codeigniter 3 
Php :: php utc time 
Php :: find substring regx php 
Php :: send attachment in mail php 
Php :: get all laravel validation failed messages 
Php :: datetime validation in laravel 
Php :: laravel check if object is empty 
Php :: livewire inline component 
Php :: index.php wont load as main 
Php :: sum of the array elements in php 
Php :: delete file in php 
Php :: generate laravel event 
Php :: laravel slug 
Php :: transform text to lowercase and replace space with dash php 
Php :: print only some characters of a string in php 
Php :: laravel 8 check if record exists 
Php :: php function comment 
Php :: subtract string php 
Php :: magento 1.9 print blank page error 
Php :: clear cache command in laravel controller 
Php :: check the ajax request in laravel 
Php :: php convert string to chars 
Php :: boot add schema in laravel 
Php :: send axios request to php 
Php :: update laravel .env variables dynamically 
Php :: target class admin homecontroller does not exist laravel 8 
Php :: php implode keys 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =