danpaul23 Posted January 15, 2007 Posted January 15, 2007 I'm getting an array from a page with an uncertain number of elements. I want to check to see if a given Array and ellement exist before continuing. The statement I'm trying but which does not give me a "true" in a "true" situation is: If IsArray($aArray[0]) Then...
FuryCell Posted January 15, 2007 Posted January 15, 2007 (edited) you are using IsArray incorrectly. what you could do is:1.check if $aArray is an array (IsArray($aArray))2.make sure $aArray[0] is contains the datatype you want (ie. for number do IsNumber($aArray[0]) ) Edited January 15, 2007 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
danpaul23 Posted January 15, 2007 Author Posted January 15, 2007 you are using IsArray incorrectly. what you could do is: 1.check if $aArray is an array (IsArray($aArray)) 2.make sure $aArray[0] is contains the datatype you want (ie. for number do IsNumber($aArray[0]) ) Great, Thanks for the Help.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now