R
R
Rigur2019-12-04 23:15:08
PHP
Rigur, 2019-12-04 23:15:08

How to replace keys with values ​​in an array?

An array with data is displayed, but the keys show the id of the fields. The fields have names, how to call not the id of the fields, but the names
here 5de8138b6a6ec319784621.jpeg

$update = $qb->DoQuery("ej1gass2x", sprintf("{'3'.XHAS.'%s'}", "a"));

foreach($update as $k => $v){
  if($k == 0) $k = 'VALUES';
  $_update[$k] = $v;
}
 
echo "<pre>";
$update = $_update;
print_r($update); 
echo "</pre>";

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question