-
Notifications
You must be signed in to change notification settings - Fork 1
Home
nishimura edited this page Sep 13, 2010
·
2 revisions
Adding loop feature.
PHP:
$objs = array();
for ($i = 0; $i < 5; $i++){
$obj = new StdClass();
$obj->val1 = "val1 $i";
$obj->val2 = "val2 $i";
$objs[] = $obj;
// or
// $arr = array();
// $arr['val1'] = "val1 $i";
// $arr['val2'] = "val2 $i";
// $objs[] = $arr;
}
$flyObj = new StdClass();
$flyObj->loopKey = $objs;
$flexy->output($flyObj);
HTML:
<table>
<tr flexy:loop="loopKey">
<td>{val1}</td>
<td>{val2}</td>
< /tr>
< /table>
{loop:loopKey}
{val1}<br />
{val2}<br />
{endloop:}
This is a forked repository. Have a look at
noopable’s Fly wiki
for more information.