every time i run mysql_fetch_array an array is returned with duplicate values e.g.
Array
(
[0] => 1
[row_id] => 1
[1] => some text
[first_field] => some text
[2] => some text
[second_field] => some text
}
but I only want single results in the array, I have tried using
mysql_fetch_array($data, MYSQL_ASSOC);
But this makes no difference.
This is the intended functionality of
mysql_fetch_array(). If you want to not have the “duplicates” and just have the associative-array, usemysql_fetch_assoc()instead.Example: