Yesideez Posted February 11, 2007 Share Posted February 11, 2007 I've been playing with these two functions and can't seem to notice much difference between them and was wondering if someone would be kind enough to explain them to me please? If I replace one for the other I get exactly the same data returned and I'm wondering if there is really any significant difference? Which is best to use? EDIT: I have been to the mysql online manuals and can't seem to understand much there Link to comment https://forums.phpfreaks.com/topic/38019-solved-difference-between-mysql_fetch_assoc-and-mysql_fetch_array/ Share on other sites More sharing options...
trq Posted February 11, 2007 Share Posted February 11, 2007 mysql_fetch_array returns both a numeric and an associative array while mysql_fetch_assoc returns only an associative. If your using associative indexes (more readble) then using mysql_fetch_assoc is slightly more efficient. I have been to the mysql online manuals and can't seem to understand much there These are both php functions (part of the mysql extension), not mysql. Link to comment https://forums.phpfreaks.com/topic/38019-solved-difference-between-mysql_fetch_assoc-and-mysql_fetch_array/#findComment-181971 Share on other sites More sharing options...
Yesideez Posted February 11, 2007 Author Share Posted February 11, 2007 Thanks for the reply - all understood I meant to say PHP and not MySQL, my bad Link to comment https://forums.phpfreaks.com/topic/38019-solved-difference-between-mysql_fetch_assoc-and-mysql_fetch_array/#findComment-181983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.