You are here: Re: array_walk - userdata as array by ref « PHP Programming Language « IT news, forums, messages
Re: array_walk - userdata as array by ref

Posted by Steve on 04/20/07 15:22

"gosha bine" <stereofrog@gmail.com> wrote in message
news:4628cb4d$0$2889$6e1ede2f@read.cnntp.org...
| On 20.04.2007 15:20 Steve wrote:
| > | function validateInput(&$value, $key, $errs)
| > | {
| > | $maxValue = 999;
| > | if ($value <= $maxValue) return;
| > | $errs[0][$key] = "message...";
| > | }
| > |
| > | array_walk($numbers, 'validateInput', array(&$errors));
| > | print_r($errors);
| >
| > doesn't work on my machine (php 5.1.6)
| >
| >
|
| works for me in php4.3 and 5.2. Make sure you're doing everything right.

including cut/paste. :)

it must be either how php is compiled or the settings it's running. i'll
keep playing with your example and see if i can get it there. btw, i don't
expect that there would be a problem with any of this in versions less than
php 5.

cheers.

 

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

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