<?php
include '../../conn.php';

$resultdata =$con->query("select * from `blog` where userType='doctor' ");

$result=array();
   while($row=mysqli_fetch_array($resultdata))
    {
     
 array_push($result,
        array(
            'id' => $row['id'],
            'title' => $row['title'],
             'description' => $row['description'],
            'autherName' => $row['autherName'],
            'createAt' => $row['createAt'],
            'thumbnail' => $row['thumbnail'],
            'image' => $row['image'],
             
            
        	));
    }

echo json_encode(array("result"=>$result));

   
?>