我将一个数组传递给一个视图,它的代码如下:
<?php foreach ($this->results as $r): ?>
<div>
<?php echo $this->url(array('id' => $this->escape($r[RecordID]) ....
假设我想使用对象表示法:
<?php foreach ($this->results as $r): ?>
<div>
<?php echo $this->url(array('id' => $this->escape($r->RecordID) ....
这可能吗?