View Single Post
  #2  
Old 12-13-2009, 06:49 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I usually just use array.size() to check if it's an array but type works too.

PHP Code:
function onCreated() {
  
// Values
  
temp.arr = {123};
  
temp.obj = new TStaticVar();
  
temp.str "abc";
  
temp.val 1;
  
  
// Type  
  
echo(temp.arr.type()); // 3
  
echo(temp.obj.type()); // 2
  
echo(temp.str.type()); // 1
  
echo(temp.val.type()); // 0

lol, misread the question.. Why not use two different params[0] like getReplySingle (when you're sending just a string) and getReplyMultiple (when you're sending an array)?
__________________
Quote:
Reply With Quote