NYCPHP Meetup

NYPHP.org

[nycphp-talk] Named parameters

Adam Maccabee Trachtenberg adam at trachtenberg.com
Sun May 11 02:12:40 EDT 2003


On Sat, 10 May 2003, Emmanuel. M. Decarie wrote:

> $cleanItem = sanitize ( $item );
> 
> $xmlItem = "";
> foreach ($cleanItem as $xmltag => $val) {
>    $xmlItem .= "<$xmltag>$val</$xmltag>\
";
> }

Yes, I was going to suggest something like this instead because it
allows you to alter the array of items and without needing to update
the rest of the code.

-adam

-- 
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!




More information about the talk mailing list