$s = [1,2,3] for loop use in php
$x = [1,2,3]<?php
/* example 1 */
for ($i = 1; $i <= 10; $i++) {
echo $i;
}
/* example 2 */
for ($i = 1; ; $i++) {
if ($i > 10) {
break;
}
echo $i;
}
/* example 3 */
$i = 1;
for (; ; ) {
if ($i > 10) {
break;
}
echo $i;
$i++;
}
/* example 4 */
for ($i = 1, $j = 0; $i <= 10; $j += $i, print $i, $i++);
?>
Also in PHP:
- current datetime in php
- in array php
- file_get_contents base64 php
- $stmt in php
- find duplicate in array php
- array unique values
- You want to develop a Laravel application on your Windows machine. For this, you installed the Laravel framework on your system. In which of the following scenarios, Laravel will not run on your system?
- date / time formatter php
- PackageManifest.php line 131: Undefined index: name
- check number is positive or negative in php
- 500 internal error laravel
- file_get_contents timeout
- execution time in php
- 3 letter month abbreviations in php date format
- desired date in pgp
- check if an array index exists php
- convert date object to string php
- check for a key in array + php
- display_errors in php
- add seconds to datetime carbon
- carbon add minutes
- 16 digit random password generator php code
- July 2, 2019 php date format
- check type of variable in php