"array in the parameter when creating pdo query" Code Answer

1
<?php

private function pdobindarray(&$postatement, &$paarray){ 
    foreach ($paarray as $k=>$v) {
        @$postatement->bindvalue($k, $v[0], $v[1]);
    }      
}

// the array structure should now look something like this

$inputarray = array(
    ':arrcity' => array($email, pdo::param_str), 
    ':another_variable' => array($pass, pdo::param_int)
);
?>
By Sunil D. on March 18 2022

Answers related to “array in the parameter when creating pdo query”

Only authorized users can answer the Search term. Please sign in first, or register a free account.