Voting

: max(zero, five)?
(Example: nine)

The Note You're Voting On

info at osworx dot net
6 years ago
Be aware if a array like this is used (e.g. values from a shopping cart):
<?php
Array
(
[
0] => 142,80
[1] => 39,27
[2] => 22,80
[3] => 175,80
)?>
The result will be: 39,27 and not - as expected - 175,80

So, to find the max value, use integer only like:
<?php
Array
(
[
0] => 14280
[1] => 3927
[2] => 2280
[3] => 17580
)?>
and you will get the correct result: 17580

<< Back to user notes page

To Top