Jump to content

Compare values in changing number of arrays?


al

Recommended Posts

I have a always changing number of arrays with values of serial numbers and have no idea how to compare those values with the first displayed array value (equal, less than, greater than) and then display warnings based on results. I tried alot of things but no luck. I think if this was only one array with increasing index key values it would be easy to extract first value and compare it with others and display the problematic one.

Any help would be appreciated fellow PHP coders!

 

If all equal than first displayed array value (OK)

If greater than first displayed array value (ERROR)

If less than first displayed array value (WARNING)

 

For example:

 

$serials = array($getserials->answer[0]->serial);

Array
(
    [0] => 1404233
)

Array
(
    [0] => 1404238
)

Array
(
    [0] => 1404233
)

Array
(
    [0] => 1404232
)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.