-1
I am using fetchAll(PDO::FETCH_NAMED) to retrieve records from my database.
received the following array
Array (
[0] => Array (
[idAgenda] => 2
[dataAgenda] => 1996-02-14
[localAgenda] => teste
[cidadeAgenda] => São Paulo
)
[1] => Array (
[idAgenda] => 1
[dataAgenda] => 1996-02-14
[localAgenda] => teste2
[cidadeAgenda] => Santos
)
)
Wondered how I get the data separately from this array?
I would do a foreach() to fetch these array values()
– Sr. André Baill
Yes, but I don’t know how to access [idAgenda],[dataAgenda]... I was trying something like this: $list([0] => ($list['idAgenda']); the array is in the list variable
– vdschuck
You can try this oh: foreach($arr as $valor){ $idAgenda = $value["idAgenda"]; echo $idAgenda; }
– Sr. André Baill
I think what you asked is what I already answered here: http://answall.com/questions/31627/
– Bacco