In my quest to make my PHP cleaner and better I came across one thing, MySQL result display.
Which one is better... mysql_fetch_array() or mysql_fetch_object(), I know they both do the same except you use an array or object to display your results.
So basically my question is... Which one is better to use?personal preference
Speed-wise, the function is identical to mysql_fetch_array(), and almost as quick as mysql_fetch_row() (the difference is insignificant).I see... thanks for that scoutt I like mysql_fetch_object...just because this debate could go on for months ...as Scoutt said..personal preference...I prefer fetch_array...but I prefer coding in OOP...so I suppose for clarity I should technically prefer fetch_object..but meh I was thinking the same thing, people are working towards Object Orientated Programming so therefor shoudln't you use fetch_object. Oh well, thanks anyways.
Which one is better... mysql_fetch_array() or mysql_fetch_object(), I know they both do the same except you use an array or object to display your results.
So basically my question is... Which one is better to use?personal preference
Speed-wise, the function is identical to mysql_fetch_array(), and almost as quick as mysql_fetch_row() (the difference is insignificant).I see... thanks for that scoutt I like mysql_fetch_object...just because this debate could go on for months ...as Scoutt said..personal preference...I prefer fetch_array...but I prefer coding in OOP...so I suppose for clarity I should technically prefer fetch_object..but meh I was thinking the same thing, people are working towards Object Orientated Programming so therefor shoudln't you use fetch_object. Oh well, thanks anyways.