Find maximum number from an array without using any function | PHP

preview_player
Показать описание
This video is about how we can find maximum number from a given array without using any built in function.
Рекомендации по теме
Комментарии
Автор

So much code if you just write this:

$prices = array("Cola" => 2.50, "Koffie" => 2, "Thee" => 1.75, "Bier" => 2.25, "wijn" => 3.75, "water" => 0.50);
$price = 0;

foreach ($prices as $prijces1 => $value) {

if ($value > $price) {
$price = $value;

}

print("The highest price is: " . $price . "\n");

NormalNick