LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Julio Araya Date: Thu Aug 21 09:42:56 2008 Subject: Re: Iterate sobre Objectos para saber la cantidad
2008/8/21 Carlos Medina <info@simply-networks.de>: > Buenas Tardes, > necesito saber la cantidad de attributes en una cantidad dada de objetos: > > Array > ( > [0] => Object > ( [attr] => test > [attr2]=> test2 > ) > [1] => Object > ( [attr] => test_a > [attr2]=> test2 > ) > [2] => Object > ( [attr] => test > [attr2]=> test2 > ) > ) > > Por ejemplo aqui necesitaria saber cuantos "attr" (no "attr2"), con value > test existen en los tres objetos y cuantos existen con value test_a > > Se les ocurre algo? > Puedes probar con una mezcla de array_count_values y array_walk http://cl2.php.net/manual/en/function.array-count-values.php http://cl2.php.net/manual/en/function.array-walk.php saludos! > Saludos > > Carlos > > -- > PHP Spanish Localization Talk Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Julio Araya C. Linux User #386141 http://www.delpho.cl
| Navigate in group php.general.es at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |