I\'m new to pdo just tried the following and getting fatal error.
$pdo = new pdo(\'mysql:localhost;widget_corp;charset=utf-8\', \'root\', \'\');
$query = $pd
$pdo->query()
will return false if the query fails. You're not initiating the pdo correctly, and you probably want to check if the query didn't return an error, so:
$pdo = new pdo('mysql:host=localhost;dbname=widget_corp;charset=utf-8', 'root', '');
$query = $pdo->query("SELECT * FROM `users`");
if($query !== false)
{
$result_array = $query->fetchAll(PDO::FETCH_ASSOC);
}