Re: Flexy and variables as array keys
| From: | Alan Knowles | Date: | Sat, 25 Sep 2004 10:31:22 +0000 |
| Subject: | Re: Flexy and variables as array keys | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14640@lists.php.net to get a copy of this message | ||
at present the best work around is
avalue(value,cell,#wwww#);
function avalue ($ar, $cell,$sub) {
return $ar[$cell][$sub];} It needs implementing in the parser, the two options are
a) value[{cell}][wwww]
b) value[$cell][wwww]
b) value[cell][#wwww#]
a) is very messy for the parser,
b) messes with consitancy
c) breaks BC.. , and is difficult anyway in the parser..
Regards
Alan
Lorenzo Alberton wrote:
Hi Alan, hi list, I need something like this in a Flexy template: =============================== {foreach:matrix,key,value}{foreach:cell_numbers,cell} value[{cell}][wwww]} <=== variable as array index {end:}{end:} =============================== where $matrix[$key] = array('wwww' => 'xxxx', 'yyyy' => 'zzzz',); and $cell_numbers is an array with integer values Any suggestion on how this can be implemented? TIA