0
I have a query in the database that returns the records in an array, I would like to know how to manipulate these records, take them from the array.
Code
$array = MinPDO::consult("intro", NULL, "id > 1", "id-", "3", "%e%");
var_dump($array);
Records
array(3) { [0]=> array(3) { ["id"]=> int(3) ["param1"]=> string(5) "ele01" ["param2"]=> string(6) "param2" } [1]=> array(3) { ["id"]=> int(2) ["param1"]=> string(5) "ele01" ["param2"]=> string(6) "param2" } [2]=> array(3) { ["id"]=> int(1) ["param1"]=> string(5) "ele01" ["param2"]=> string(6) "param2" } }
Where you want to manipulate in the view or in php code itself?
– Felipe Paetzold
To access some value you can do
$array[0]['param1']
– rray
In the view and in the code itself too.
– KevinF