I'm using core php, Actually i'm getting post value from submitting my form,i'm going to pass that variable to like query at the time showing issue like :
Fatal error: Cannot use object of type mysqli_result as array in C:\xampp.
I don't know what is the mistake I did please help me.
Here's my code:
if(isset($_POST['list'])){
//-----from post value----//
$location_type =$_POST['list'];
$arr = explode(' ',trim($location_type));
$listing=$arr[0];
$all_location ="select * from tbl_master_property where pg_address like '%$listing%'";
$location_result=$conn->query($all_location);
while($row=mysqli_fetch_assoc($location_result)){
$location_result[] = $row['pg_address'];
}
echo "<pre>";print_r($location_result);die;
}