How to find data in a array of dates

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

How to find data in a array of dates

Post by eshban »

Hi,

I need to search one date in array of date i.e.

ArrayofDates = { ‘12/05/2010’, ‘20/05/2010’, ’25/05/2010’ }

Search Able Date = ‘16/05/2010’

If we search “Search Able Date” i.e. ‘16/05/2010’ in “ArrayofDates” array and if record exists then it should tell this.

Kindly help that how to do this

Regards,
Eshban
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: How to find data in a array of dates

Post by markusn00b »

Have a look at in_array().

Mark.
Post Reply