PDO::FETCH_OBJ php

后端 未结 2 389
自闭症患者
自闭症患者 2021-01-26 07:16

PDO::FETCH_OBJ -> Returns an anonymous object with property names that correspond to the column names returned in your result set. For example:

 Array ( [0] =>         


        
2条回答
  •  长情又很酷
    2021-01-26 07:56

    You can see in what you pasted that $results is an array of objects, so you need to specify which item in the array to get a proper result for email.

    Example:

    print_r($results[0]->email);
    

提交回复
热议问题