[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Shorthand for appending to a table (was Re: 5.2 feature list?)
- From: "Kucera, Rich" <Kucerar@...>
- Date: Tue, 12 Sep 2006 11:47:36 -0400
> [PHP] "create_function" looks kind of clunky...
>
> array_walk( $recordForView,
> create_function('&$item1,$key,$prefix',
> '$item1=($item1 == "on")?$prefix:""'),
> '*** ADD ***');
Lua:
table.foreach(recordForView, function(k,v) if v == "on" then
recordForView[k]='*** ADD ***' end end )
That's nice...
-R