In other people's code I see both being used. So when retrieving database records, which should be used and when?
2 Answers
mysql_fetch_array() is more generic than mysql_fetch_assoc(), although it can generate the exact same results using proper parameters.
However, if you only need an associative array, I would advise you to use the latter, as the former makes the code more ambiguous or heavy, depending on how you use it.