I have this PDO:
$id = 1;
$title = 'resourceName';
$url = 'resourceURL';
$result = array($title => $url);
include('../dbconnect.php');
$pdo = new PDO("mysql:host=$db_host;dbname=$db_name;", $db_user, $db_password);
$stmt = $pdo->prepare("SELECT resourceName, resourceURL FROM Resources WHERE categoryID = :id");
$stmt->bindParam(':id', $id);
$stmt->execute(array_values($result));
$row = $stmt->fetchAll();
print_r($row);
I am just getting this error: Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
How can make the PDO result be an array where resourceName is the key and resourceURL is the value?