why we need a function like fetch_object and what is the purpose of using it?Procedural programmers do use functional and OOPs programmers use class and objects.
So it's just a facility and not a burden on anybody. If you're following OOPs pattern then you may use mysql_fetch_object function otherwise get the processing done using mysql_fetch_assoc function. It all depends the kind of model we're using. The only difference is whether you want to use array or object??