0
我有一個這樣的數組:OpenTBS ODP - 自動滑動添加和子塊
$entryArray = array();
$i = 0;
foreach ($entities as $value){
$entryArray[$i]['modul'] = $value->getModul()->getName();
$entryArray[$i]['matches']['date'] = $value->getDate();
$entryArray[$i]['matches']['tonality'] = $value->getTonality()->getName();
$entryArray[$i]['matches']['author'] = $value->getAccountname();
$entryArray[$i]['matches']['content'] = $value->getContent();
$entryArray[$i]['matches']['follower'] = $value->getFollower();
$entryArray[$i]['matches']['link'] = $value->getlink();
}
它正常工作沒有「匹配」和不用子attribut。 這裏是我的模板:
我想moduls歸類表:
modul1 table1的
modul2 表2
,我想一個新的幻燈片之後幻燈片的到底是到達。
非常感謝您爲每一個如何能幫助我在這;)
你的模板建議你想合併幾個模塊,每個模塊有幾個'matches'。雖然你的PHP代碼片斷表明你只有一組模塊,但每個模塊只有一個「匹配」。根據你的模板,模塊的數據結構應該像'$ module = array('name'=>'...','matches'=> array(...))' – Skrol29 2014-11-05 21:56:37
好吧謝謝:)任何想法如何我可以拆分幻燈片後10 entrys?幻燈片到達幻燈片結尾後,我想添加幻燈片。 – chuebert 2014-11-06 07:32:12