end foreach loop
$arr = array('one', 'two', 'three', 'four', 'stop', 'five');
foreach ($arr as $val) {
if ($val == 'stop') {
break; /* You could also write 'break 1;' here. */
}
echo "$val<br />\n";
}
/* Using the optional argument. */
$i = 0;
while (++$i) {
switch ($i) {
case 5:
echo "At 5<br />\n";
break 1; /* Exit only the switch. */
case 10:
echo "At 10; quitting<br />\n";
break 2; /* Exit the switch and the while. */
default:
break;
}
}
?>
foreach($equipxml as $equip) {
$current_device = $equip->xpath("name");
if ( $current_device[0] == $device ) {
// found a match in the file
$nodeid = $equip->id;
break;
}
}
Also in PHP:
- array exists key php
- buscar palabra en cadena php
- error reporting
- eloquent timestamps false
- create a new project laravel
- count variable lenth in php
- check if string contains letter php
- descargar laravel
- How to format date from datetime php
- can we seed test database in laravel with seeder?
- api header php
- change date format php
- Example wp-config.php for Debugging
- STR_TO_Time('" . $purchaseDate . "', '%Y-%m-%d %H:%i:%s'), php
- character count in php
- base64 to image
- capitalize letter in php
- convert matrix row to column php
- create custom pagination in laravel 7 for api
- current day + one day php
- clear cache artisan laravel
- Route pattern cannot reference variable name more than once. laravel
- cache->clear all laravel host
- clear session laravel