Home Illegal string PDO fetch() vs fetchAll()
 When I try to call fetch() after executing a PDO statement, I get the following warning: Warning: Illegal string offset It works perfectly when I use fetchAll(), though. What's the difference between the two, and how would I use either one? $allData =$con->prepare("SELECT * FROM users"); $allData->execute();$result = \$allData->fetch();