try{
$db = new PDO("dbtype:host=yourhost;dbname=yourdbname;charset=utf8","username","password");
}catch(PDOException $e ){
die( "Error: ".$e);
}
$query=$db->prepare("SELECT datestart, dateend FROM main WHERE namenomer = ?");
$query->execute(array($nnomer));
while($row=$query->fetch(PDO::FETCH_OBJ)) {
}
$resp = array_map(function ($next) {
return [
'BRAND' => $next['BRAND'],'PRICE'=>$next['PRICE'],
];
}, (array) $json_responce_data->RESP);
var_dump($resp);