I\'m trying to dynamically bind mysql_stmt parameters and get the result in an associative array. I\'ve found this post here on stackoverflow where Amber posted an answer wi
Just to compare excellent answers from @Emmanuel and @matzino with the code you can get if choose PDO over mysqli:
$sql = "SELECT `first_name`,`last_name` FROM `users` WHERE `country` =? AND `state`=?";
$params = array('Australia','Victoria');
$stm = $query->prepare($sql);
$stm->execute($params);
$results = $stm->fetchAll(); // or fetch() or fetchColumn() depends on expected type
whoops, that's all?