What im trying to do is to save vales of "option" from all records in array to be able to echo them out later. I don't know how to display them seperatly. Feel stuck. Any sugestions?
My code:
$result = $mysqli->query("SELECT option FROM `myoptions` WHERE id IN (1, 7, 18, 24);");
$row = array();
while($row = $result->fetch_array()) {
echo $row[] = $row["option"];
}
echo $option1 = $row[0];
echo $option2 = $row[1];
echo $option3 = $row[2];
echo $option4 = $row[3];