the isarray() function would be useful here in validating values in these functions.

Of course making the functions work is probably more important than keeping it working right now...
_________________________
How to ask questions the smart way <-----------> Before you ask