Skip to content


PHP in_array() function in ActionScript for Flex

Another common PHP function is in_array() used to determine if a value exsists in an array. Here is the function recreated in actionscript for flex.

public function in_array( needle:*, haystack:Array ):Boolean{   var itemIndex:int = haystack.indexOf( needle );   return ( itemIndex < 0 ) ? false : true;}

Posted in Actionscript, Code.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.



close