I am having a problem trying to explode an array, connection to database works and tested, the commented print line works, but the explode doesn't, every time i explode the item it
prints ArrayArrayAray. I have been stuck on this for so long, looked everywhere, followed examples but to no avail. If anyone could help it will be much appreciated.
$result_ = mysql_query("SELECT * FROM " .PRODUCT_INSTRUCTIONS. " order by group_code") or
die($errorhandler->add("ERROR", __FILE__ . "=>" . __CLASS__ . "=>" . __FUNCTION__ . "=>" . __LINE__, "Failed getting items." . mysql_error()));
while($rows_= mysql_fetch_array($result_)){
$instruction = $rows_['instructions'];
// print "<tr><td>".$rows_['group_code']."</td></tr>"." <tr><th>".$instruction."</th></tr>";
$inst = explode("|", $instruction);
for($i = 0; $i < count($inst); $i++){
echo $inst;
}
}
?>
echo $inst;
ing each time. In other words, you are outputting the array each time, not the array's contents. – Niet the Dark Absol Jul 3 at 9:34echo $inst[$i]
...!? – deceze Jul 3 at 9:35