I have an doubt about json, I am fetching value from database by using json array!! i.e: updated:
$json=[];
$query="select * from json where id='".$id."'";
$run=mysqli_query(connection,$query);
$i=0;
while($exe=mysqli_fetch_array($run,MYSQLI_ASSOC)) {
$json[$i]["name"]= $exe["name"];
}
note: this code is in another page(page 1) and i get values through a ajax call in another page(page 2)
and i need to access value of $json[$i]["name"]= $exe["name"];
as $name in page 2 for another function
ex :
$query1= "select name from json1 where name='".$name.'"";
i dont know how to access value in json array.please help me to clear this doubt