Just right here to solve certain things.
I'm breaking my head to do this loop but I have not gotten it yet.
How do I put the highlight in this array (), with only 1 of those photos being marked as 1.
$fotos = $this->input->post('fotos[]');
$destaque = $this->input->post('destaque[]');
$foto = array();
foreach ( $fotos as $item => $value){
array_push($foto, array(
'idFoto' => $id,
'img' => $value
'destaque' => $
));
}
The result I hope is something like this:
array(
array(idFoto => 1,
img => 1.jpg,
destaque => Null),
array(idFoto => 2,
img = 2.jpg,
destaque => 1), //Nesse caso o radio foi checado
array(idFoto => 3,
img => 3.jpg,
destaque => Null)
);
In the case of html I make the input of several photos and one of them I select as a highlight.