Posted by Paul Lautman on 06/13/06 08:32
Steffen wrote:
> Hi Paul
> > Are there any benefits to using mysql_fetch_object() instead of
> mysql_fetch_assoc()?
> AFAIK there is only one major difference.
> mysql_fetch_assoc returns an array, mysql_fetch_object() returns an
> object that contains the same values as the array.
>
> mysql_fetch_assoc()
> $row["userid"]
>
> mysql_fetch_object()
> $row->userid
>
> Regards
> Steffen Jahr
Yes I know the difference. To me there are adantages of using
mysql_fetch_assoc() in that you can use the array functions such as
array_walk and uasort(). I was wondering if mysql_fetch_object() brought any
advantages that mysql_fetch_assoc() did not have?
Navigation:
[Reply to this message]
|