我传递 我要做的是在我的数组中使用这个数组 查看如下: p>
但是我在 $ data code>数组进行查看。
$ data code>数组就像: p>
$ data = array('t0'=> array('point'=> 0),' t1'=> array('point'=> 2)....);
code> pre>
<?php echo $ t0 ['point']; ?> //它可以工作!
code> pre>
for code>循环中通过结构定义来做这个。 因此,我需要将数值(在'
t code>'字母附近)作为变量传递。
我能如何实现这一目标? p>
div>
I passed $data
array to view. $data
array is like:
$data = array('t0' => array('point' => 0), 't1' => array('point' => 2) .... );
What I am trying to do is using this array in my view as follows:
<?php echo $t0['point']; ?> //It works!
But I am doing this in a for
loop by definition of structure. Therefore I need to pass numeric value(near 't
' letter) as a variable.
How can I achieve this?