You can do this with PDO
First instantiate the $pdo object, read the manual for how to do that here:
$sql = 'select CustomerID, Name, State, Zip from customer where CustomerID = :id';
$sth = $pdo->prepare($sql);
$sth->bindParam( ':id', $id );
The trick here is the PDO::FETCH_GROUP
Your array will have the value of the first column as array key and the rest of columns are value of that array.
By the way, you don't have to select just one customer, this was just an example. You can just as easily select all customers or customers whose State = 'NY', in which case you get array where array keys are customerID and values are arrays with the rest of customer data.
Basically, you will have array that looks exactly how you wanted it to look. Just dump your ezSql and switch to PDO.
I've been using DB class from pear, then MDB2 from pear for years, then finally dumped them in favor of PDO and it's been great, I'll never use anyther DB class again.