Returns the maximum value contained in an array.
Syntax:
Can i get the index of that value?
No, you’ll have to do a loop through the array to find it
HI, I just want to know how to use the ArrayMax(). If I have three values like: 3, 4, and 5. Can I simply use: MyMax = ArrayMax(3, 4, 5) ?
No, you have to pass your variable array name into the instruction. In this example, the code will return 5:
$a[0]=3 $a[1]=4 $a[2]=5 return arraymax($a)
Can i get the index of that value?
No, you’ll have to do a loop through the array to find it
HI, I just want to know how to use the ArrayMax(). If I have three values like: 3, 4, and 5. Can I simply use: MyMax = ArrayMax(3, 4, 5) ?
No, you have to pass your variable array name into the instruction. In this example, the code will return 5:
$a[0]=3
$a[1]=4
$a[2]=5
return arraymax($a)