Reply to NuSOAP array detection

Your name:

Reply:


Posted by Treefrog on 10/30/97 11:46

Hi,

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

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.

E.G.

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

$data['id']
$data['name']


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

$data[0]['id']
$data[0]['name']
$data[1]['id']
$data[1]['name']

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]))?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация