I have a project that i need to fetch phone number from phone number column from mysql database and store it into a 1-dimensional array.
$sql = "SELECT phone_number FROM student WHERE faculty='$faculty' and department='$department' and course='$course' and level='$level' and session='$session'";
$query = mysqli_query($connection, $sql);
if ($query) {
$numRow = mysqli_num_rows($query);
if ($numRow > 0) {
while ($row = mysqli_fetch_assoc($query)) {
$phone = $row;
}
}
}'