You are here: Re: Which array function? « PHP Programming Language « IT news, forums, messages
Re: Which array function?

Posted by deko on 09/11/06 12:25

> array_filter() doesn't modify its argument, since it is passed by value not
> reference. Therefore $myarray won't have the timestamps removed, and can be
> used again.

Thanks, that helped. Seems like these functions want constants. I was had
trouble with a variable.

Here's what I ended up with:

function getbaz_current($var)
{
return ($var <= MAXDAILY);
}

function getbaz_new($var)
{
return ($var < TIMEAGO30D && $var >= MAXDAILY);
}

$baz_current = array_filter($counter_array, "getbaz_current");
$baz_new = array_filter($counter_array, "getbaz_new");

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация