So I have a php script for PDO I have been using, not big but the line that's giving me trouble is:
while ($row = $try->fetchAll(PDO::FETCH_ASSOC)) {
var_dump($row);
This outputs the data in the intended manner:`
array(5) {
[0]=>
array(2) {
["DataID"]=>
string(1) "1"
["Description"]=>
string(3) "!!!"
}
[1]=>
array(2) {
["DataID"]=>
string(1) "2"
["Description"]=>
string(18) "This is document 2"
}
BUT when I change the final line to:
echo implode(" - ", $row);
It outputs:
Array
Array
May I know why this is the case and how I will be able to fix this? Thank you!