0
Who can help me to implemtent this algorithm in PHP language?
Algorithm : "Write an algorithm who displays the max of 5 integers entered by an user" I want to implement it in PHP language. i do it in Python correctly. here is my python code => https://drive.google.com/open?id=1EoIj3DZANvuLk0yVPaHgjegAF0KZomWV help to implement it in php. My english is not good! thx
5 Answers
+ 1
Murdet Pierre, why you did not put your Python code in the Playground?
It would be easier for us to see.
0
Okay, here is the link => https://code.sololearn.com/ct12wiGpEbjd/?ref=app
0
In PHP there is a function called 'max' that if you pass it an array of integers it will return the bigger.
echo(max([2, 4, 1, 6, 3])) // => returns 6
https://www.w3schools.com/php/func_math_max.asp
0
Thank you, It's really useful, this function max, but in fact, I wanted to understand how the loops work in php, I looked for algorithm examples that require a loop, and I implement it in python and PHP .
Apparently, loops do not work the same way in all languages