I am new to php, for my android application I am using php. My problem is I can not able to access the array object value.
Store the select query table value like below
$rows = array();
$i=0;
while($r = mysqli_fetch_assoc($result)) {
$rows[$i] = $r;
$i++;
}
When I display the value using echo json_encode($rows); it will display [{"CurrentVersion":"0.0.1","ForceUpdate":"1"}] this value. But when I trying to access this value in php I can not able to access I tried the below methods.
echo $verDetails[0].ForceUpdate; => ArrayForceUpdate <- I got this value
echo $verDetails[0] => Array <- I got this value
echo $verDetails[0]->ForceUpdate;=> Nothing got
I want to get the Forceupdate value = 1. Please help me, I know many one feel this is the cheap question and you will put negative vote, but I don't have other option. I tried in many ways but I am not get any answers.