how can i fill following type array dynamicly in for loop
array('items'=>array(
array('label'=>'News', 'url'=>array('/site/index')),
array('label'=>'News2', 'url'=>array('/site/2')),
));
I am new in programming
thanks for help
![]() ![]() ![]() |
|||
|
![]() ![]() ![]() |
Try this:
And the resulting array will be in the form:
..depending on the |
||
|
![]() ![]() |
You can access the array by square brackets, by both alphanumerical and purely numerical keys. Anyway I suggest reading a basic php course. |
||
|
![]() ![]() |
use for to loop like :
|
||||
|