Código PHP:
$cnx = cnxBdD();
$consulta = "SELECT celda1,celda2 FROM tabla WHERE accDir=?";
if ($prgt = $cnx->prepare($consulta)) {
$prgt ->bind_param("i", $accDir);
$prgt->execute();
$prgt->store_result();
$prgt->bind_result($rClave,$rValor);
while($prgt->fetch()){$res[$rClave]=$rValor;}
$prgt->free_result();
} else {throw new Exception('Error',11);}
$cnx->close();
print_r($res);