duanfan5012
duanfan5012
2013-01-15 19:28

在php中添加foreach-loop到数组值?

  • php

I'm trying to add a foreach to an array in php(it's part of a templating-language)

array('key' => 'some value' . 
foreach ($contents as $content) {
  echo '<li>';
  echo $content['message'];
  echo '</li>';
}; .
'more data',
)

This is the error: Parse error: syntax error, unexpected T_FOREACH in /home/zenconomy/deploy/trunk.zenconomy.se/webroot/zenconomy/controllers/public/om.php on line 62

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答