I have an array that shows properly with print_r but when I convert it to a string it only shows array,array,array,array instead of the actual array values.
if (!$result) {
printf("Query failed: %s\n", $mysqli->error);
exit;
}
while($row = $result->fetch_row()) {
$recipients[]=$row;
}
print_r($recipients);
$ids = implode(',', $recipients);
echo $ids;
The output is:
Array ( [0] => Array ( [0] => 1 ) [1] => Array ( [0] => 3 ) [2] => Array ( [0] => 100 ) [3] => Array ( [0] => 118 ) [4] => Array ( [0] => 142 ) [5] => Array ( [0] => 276 ) [6] => Array ( [0] => 308 ) ) Array,Array,Array,Array,Array,Array,Array