I am writing the result of a database query to an array row by row, then I am adding my own row to the last index of the array. I am using Google developer tools to view the result of the array which are as follows:
10: {strat_id:1, x_id:1, outcome_id:52, date:1364655600, status:0, rank:1,…}
>
strat_id: "1"
status: "0"
date: "1364655600"
x_id: "1"
outcome_id: "52"
rank: "1"
11: {strat_id:4, x_id:1, outcome_id:49, date:1365674916, status:1, rank:1,…}
>
strat_id: 4
status: "1"
date: 1365674916
x_id: 1
outcome_id: 49
rank: 1
The ">" character denotes where I have expanded the index. Index 10 is the last row from the database and as you can see when expanded the values are surround by quotations. Index 11 is data which I have added manually, when expanded as you can see the values are not surrounded by quotations (except for 'status').
In the interests of consistency should I bother with this detail? In order to add to the array I am using:
$newarray=array("strat_id"=>$_POST['gridID']+1, "x_id"=>$_SESSION['xID'], "outcome_id"=>$_POST['cellID']+1, "date"=>time(), "status"=>$_POST['type'], "rank"=>1);
The results of the data base I am getting with:
$result->fetch_array(MYSQLI_ASSOC)
Thanks.