[PHP] Re: trouble with array_search

2003-08-30 Thread Merlin
thank you for your help. I have found that the error was laying somewhere else. The code like you wrote was ok. Cheers, merlin Catalin Trifu wrote: Hi, I printed the values out, and inserted it into a varibble to check if it finds it. In this case it works! But it only wokes if I do it lik

Re: [PHP] Re: trouble with array_search

2003-08-30 Thread Jim Lucas
ng zeros, that is because normal integers do not retain their leading zeros even if you enter them. Jim Lucas - Original Message - From: "Merlin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 30, 2003 9:02 AM Subject: [PHP] Re: trouble with array_se

[PHP] Re: trouble with array_search

2003-08-30 Thread Catalin Trifu
Hi, I printed the values out, and inserted it into a varibble to check if it finds it. In this case it works! But it only wokes if I do it like this: array('03042003'); This does not work: array(03042003); When you make array(03042003) what you get is an array like this Array ( 0 => 3042003 )

[PHP] Re: trouble with array_search

2003-08-30 Thread Merlin
I printed the values out, and inserted it into a varibble to check if it finds it. In this case it works! But it only wokes if I do it like this: array('03042003'); This does not work: array(03042003); So I gues it has something to do with this? It really drives me crecy, I already spent an hou

[PHP] Re: trouble with array_search

2003-08-30 Thread Catalin Trifu
Hi, You don't have to convert to string; PHP does it automatically. Did you check for the $dates array, does it really contain what you think it should. So, try to make a print_r($dates) and see if you have what you expect. FYI: array_search() returns the key of the last found element