Answer the question
In order to leave comments, you need to log in
How to find the maximum value in an array formed by Array_push()?
Hello.
An array is formed as follows:
$massiv=array();
array_push($array, $peremen); // $peremen has integers taken from the loop. Different from 1 to 100
Find and display the maximum value from this array.
I do this:
$result = max($array);
echo $result.
But the value is empty. Am I doing everything right?
Answer the question
In order to leave comments, you need to log in
$result = max(array); =>$result = max( $ massiv);
Use editors with syntax highlighting, such errors are generally caught at the IDE level.
PS: $massiv, $remen ... is it really impossible to see 2 words in the translator? What are the names?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question