kal-el,
il y a 13 ans
Tu ne peux simplement pas faire de boucle foreach à l’intérieur d'un array. Je te propose le code suivant :
<?php
$options = array();
foreach ($artefact as $k => $v) {
$options$v'Artefact']'id']] = $v'Artefact']'name'];
}
echo $this->Form->input('type', array(
'options' => $options,
'empty' => 'Veuillez sélectionner une valeur : '
));
?>
Enjoy :)