<?php
$host='localhost';
$user='amr123';
$password='AMRdahes03250@';
$dbname='amraccountant';
$conn = new mysqli($host, $user, $password, $dbname);
$conn->set_charset("utf8");
 
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$sql = "select * from datavedio ORDER BY id DESC";
$response= array(); 

$stmt = $conn->prepare($sql);
$stmt->execute();

$stmt->bind_result($id, $namevedio ,$imagevedio ,$numbervedio,$Uri,$Urivedioone);
 
while($stmt->fetch()){
 
 $post = [
  'id'=>$id,
 'namevedio'=>$namevedio,
 'imagevedio'=>$imagevedio,
 'numbervedio'=>$numbervedio,
 'Uri'=>$Uri,
 'Urivedioone'=>$Urivedioone,
 
 ];
 
 array_push($response, $post);
}

echo json_encode(array("post"=>$response),JSON_UNESCAPED_UNICODE);


?>