netrosly

Test function

Jan 26th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. function conArray(&$stmt, &$out){
  2.     $result = mysqli_stmt_result_metadata($stmt);
  3.     $fields = array();
  4.     $out = array();
  5.  
  6.     $fields[0] = $stmt;
  7.     $count = 1;
  8.  
  9.     if(!is_bool($result)){
  10.         $data = array();
  11.         while($row = $result->fetch_assoc()){
  12.             $data[$count] = &$out[$row->name];
  13.             $count++;
  14.             echo($row);
  15.         }
  16.            call_user_func_array('mysqli_stmt_bind_result', $data);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment