quick question
Posted: Wed Jun 11, 2008 6:57 pm
hello,
I am iterating through an array in my PHP script... There are two "types" of values in this array - some are numbers, others are words. I need to be able to filter this quickly and easily, like using regular expressions in Ruby. So, for example, if my array looks like this: $myarray = ["1","administration","it_support","5","10",13","human_resources"] then when I iterate over this I want to do something different for the numbers and names.
Any and all help is appreciated!
Thanks,
-Jeff
I am iterating through an array in my PHP script... There are two "types" of values in this array - some are numbers, others are words. I need to be able to filter this quickly and easily, like using regular expressions in Ruby. So, for example, if my array looks like this: $myarray = ["1","administration","it_support","5","10",13","human_resources"] then when I iterate over this I want to do something different for the numbers and names.
Any and all help is appreciated!
Thanks,
-Jeff