Kashif Ali

Kashif Ali

  • NA
  • 78
  • 9.9k

Unable to display result in an array PHP

Jan 18 2019 10:49 PM
$emp1 = $_POST['student1'];
$emp2 = $_POST['student2'];
$emp3 = $_POST['student3'] ;
 
$mys = "SELECT mobile FROM users where name = '$emp1'  AND name ='$emp2' AND name = '$emp3'";
$result= mysqli_query($conn, $mys);
foreach($result as $row)
{
}
$me = $row["mobile"];
 
$contacts = array(', ',$me); 
 
$mobile = implode(',', $contacts);
 
 
Please help me , i'm unable to display result in an array means 
$me not displaying any record in an array . 
where is the error 

Answers (2)