View Single Post
  #1  
Old 10-31-2007, 10:21 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
weird bug [arrays]

well, it's odd.

Here's an array thing

HTML Code:
function onCreated() 
{
  temp.array = { {"Heya", "Fish"}, {"hiya", "Bull"} };
  temp.search = {"Heya", "Fish"};
  echo(temp.array.index(temp.search));
}
However, it'd return a negative number, indicating that it can't be found!
Although, if I am to do this

HTML Code:
function onCreated() 
{
  temp.array = { {"Heya", "Fish"}, {"hiya", "Bull"} };
  temp.search = {"Heya", "Fish"};
  echo(temp.array.index((@ temp.search)));
}
It'll give the correct array index... strange but true I must say
__________________
Reply With Quote