The Script:
<?php
$tqs = "SELECT * FROM `table_two`";
$tqr = mysqli_query($dbc, $tqs);
$row = mysqli_fetch_assoc($tqr);
$thearray[] = $row['some_text_id'];
// Prints e.g.: Array ( [0] => 164, 165, 166 )
print_r($thearray);
echo "<br/><br/>";
echo "<br/><br/>";
$thearray = explode(", ", $thearray);
print_r($thearray);
?>
I have the following entry in one row of the column "some_text_id":
164, 165, 166
I am looking to "explode" this by the comma and have it stored in an array, so I can select the numbers individually, e.g.:
myarray[0], myarray[1], myarray[2]
Though I am getting the following error message:
Warning: explode() expects parameter 2 to be string, array given in ... (points to the explode function)
Any suggestions on how to do this?