categoryID
10
20
30
For example. Above is my categoryID column with values of 10, 20, and 30 PHP MySQL. What I want to do is to echo those values using an array. Like -> 10 20 30. Below is my code. In my code. I just stored all row data from categoryID into my $array variable. My concern is. How do I echo all the values?
Thank you for the help!
<?php
include ("dbconnect.php");
$sql = "SELECT categoryID FROM post";
$result = mysqli_query($con, $sql);
$array = array();
while($row = mysqli_fetch_assoc($result)) {
$array[] = $row;
}
?>