i create displaydata but i want condition like below
function display(){
$get_data = "SELECT * FROM table";
$run_data = mysqli_query($connect, $get_data);
$check_data = mysqli_fetch_array($run_data);
if($check_data == 0){
echo "No post yet";
}
else
{
echo "Display post";
}
}
the data did not display "no post yet" when the query is none.
did i do wrong ?
thanks in advance.