How to fetch a row with PDO
问题 I'm trying not to get frustrated, but I've recently learned that mysql_* is deprecated in PHP. I've decided that I would learn how to use PDO. I've just been looking at it this afternoon, and connecting to the database using it was easy, but then I wanted to fetch a row with it and save the row as an array indexed by the column names (the same way as the function mysql_fetch_array did). I can't figure it out to save my life. I'll post my code to clarify, and I'm sure it is something simple