Answered Questions

  • why we need a function like fetch_object and what is the purpose of using it?

    we have fetch_array to fetch a row from a result set... in what way the fetch_object function is useful... at which situation it is used? every question is like what is the difference and the answers is just like the following 'fetch_array" gives an array of any type but fetch_object will return an object.... but WHY???

    abc

    • Sep 12th, 2011

    Fetch array normally retrieves the records based on array index. i.e. like $row[1], but if you want to retrieve the record based on the column name we can use fetch_object i.e. $row['username']