RE: [PHP] filter out with date?
| From: | John W. Holmes | Date: | Mon, 09 Jun 2003 01:54:56 +0000 |
| Subject: | RE: [PHP] filter out with date? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150693@lists.php.net to get a copy of this message | ||
> I got the array info: on the articles:
> Array
> (
> [0] => ingress Object
> (
> [artikkelid] => 241
> [nettstedid] => 11
> [gyldig] => 1
> [overskrift] => motorsport formel1
> [artikkellink] => art.php?artikkelid=241
> [forfatternavn] => Aleksander Lyse
> [forfatterlink] => http://www.ikke.no/
> [ingress] => Formel1
> [publisertLang] => 20030530135301
> [publisert] => 2003 30/05
> [bilde] =>
> [artikkeltypeid] => 38
> )
>
> The code I use to feed the articles are:
>
> if($ingresser =
> hentIngresser($nettstedid,37,$sprakid,$offsetannet,$antal1ingress))
> listIngresser1($ingresser);
>
> How can I only show the articles from eg. 2003 01/06 - 2003 31/6
Wouldn't it be smarter to only fill this array with items matching the
date you want in the first place??
Anyhow...now you'll have to loop through each "ingress Object" and see
if substr($obj->publisert,-2) matches the month you want.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/