<?foreach($arr as $value)?>
.....
$title_bl = $value['title'];
$descr_bl = $value['descr'];
$img_bl = $value['img'];
?>$json = [
{
"title_bl": "title",
"descr_bl": "descr",
"img_bl": "img"
},
{
"title_bl": "title",
"descr_bl": "descr",
"img_bl": "img"
}
] $keys = ['title_bl', 'descr_bl', 'img_bl'];
$res = [];
foreach($arr as $value) {
$res[] = array_combine($keys, $value);
}select title as title_bl, descr as descr_bl .... from ....$res[] = $value;