When retrieving data from MySQL, the PHP array output has both numeric and name indexes. How can I prevent this?
I fetch using:
$stmt = $this->dbObj->Prepare($sql);
$rs = $this->dbObj->Execute($stmt);
if (!$rs) {
trigger_error($this->dbObj->ErrorNo() . ' ' . $this->dbObj->ErrorMsg(), E_USER_ERROR);
}
$this->videos_voted = null;
while ($row = $rs->FetchRow()) {
$this->videos_voted[$row['video_id']] = $row;
}
The output:
Array
(
[16] => Array
(
[0] => 16
[video_id] => 16
[1] => 1028
[total_views] => 1028
[2] => No
[featured] => No
)
)
As you can see, the output has both numeric and name indexes.