$params = [
"id" => $array['category_id'],
"cat_name" => $array['category_name'],
"cat_url" => $array['category_url'],
"image_url" => $array['image_url'],
"parent_cat" => $array['parent_cat'],
];
$a = [];
foreach ($params as $k => $v) {
$a[] = "`$k` = :$k";
}
if (count($a)) {
$s = implode(", ", $a);
$sql = "UPDATE {$this->table} SET $s WHERE `id` = :id";
}
$arr = json_decode ($json_text, true);
, как советовали выше.