NuSOAP array detection

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm using NuSOAP to call a web method, that returns an array of

The trouble is, when there's only one account, NuSOAP doesn't return an
array, it just returns the associative array that is the account data.


$data = someNuSOAPCall(); // returns 1 account


$data = someNuSOAPCall(); // returns many accounts


However, this makes using it a bit more complicated then I'd like. I
need to detect if I have an array or accounts, or if I just have an
account 'object', but how can I check for a difference, asside form
using if (isset($data[0]))?

Site Timeline