Ever wondered what the difference between mysql_fetch_array and mysql_fetch_assoc is? What about mysql_fetch_row? I’ve always used mysql_fetch_array, but, for debugging purposes, here’s what they all do:
mysql_fetch_array() returns essentially two arrays, one with a numeric index and one with an associative based key index. Thus, using mysql_fetch_array() without specifying which method you want (either MYSQL_NUM or MYSQL_ASSOC), always returns a double array, which is considerably more inefficient as compared to mysql_fetch_row() or mysql_fetch_assoc().
Once a week or so we send an email with our best content. We never bug you, we just send you our latest piece of content.
If you found any value in this post, agree, disagree, or have anything to add - please do. I use comments as my #1 signal for what to write about. Read our comment policy before commenting! Comments such as "Thank you!", "Awesome!", "You're the man!" are either marked as spam or stripped from URL.