의 값을 에코. 나는 그런 식으로 그것을 시도 :는이 코드를 foreach 루프
if(!empty($item['criteria'])){
foreach ($item['criteria'] as $item2){
echo '<a href="javascript:toggle(', $item2['id'], ')">'Click</a>
<div id="', $item2['id'], '" style="display: none">', $item2['description'], '</div>';
}
}
}
내가 어떤 징후에 실수가 있다고 생각합니다.
당신은 PHP [문자열 구문]을 배울 필요가있다 (http://php.net/manual/en/language.types.string.php#language.types.string.syntax.single) –