fetch_array returns an indexed value. But Fetch_assoc just returns a value.
for example fetch_array returns
[0] => 11 [id] => 11 [1] => 2014-12-29 [date] => 2014-12-29
here the location of array 0 contains 11, also this location name is 'id'.
same as fetch_assoc will return
[id] => 11 [date] => 2014-12-29
means it just returns a value.
Code snippet
source share