Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-21-2008, 04:41 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
"in" operator on returned array.

The error I've found is that if you want to use the var in array, the array needs to be a variable defined in the function itself; not a returned value from a function. ( I also highly suspect that someArray()[2] doesn't work. )

PHP Code:
function someArray() {
  return {
0,1,2,3};
}

function 
onCreated() {
  if ( 
2 in someArray() ) {
    echo(
"Works!");
  } else {
    echo(
"Doesn't work.");
  }

Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.