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;
}
No comments:
Post a Comment
Thank you for the comments.