echo '{'
. '"status_code":"' . $statusBD->status_code. '", '
. '"status_date_added":"' . $statusBD->status_date_added. '", '
. '"status_title":"' . htmlspecialchars($statusBD->status_title). '", '
. '"order_id":"' . $statusBD->order_id. '", '
. '"order_item_id":"' . $statusBD->order_item_id. '", '
. '"event_id":"' . $statusBD->event_id. '", '
. '"date_event":"' . $statusBD->date_event. '",'
. '"place_price":"' . $statusBD->place_price. '", '
. '"place_velue_id":"' . $statusBD->place_velue_id. '", '
. '"place_status_title":"' . htmlspecialchars($statusBD->place_status_title). '", '
. '"place_status_code":"' . $statusBD->place_status_code. '", '
. '"place_prodVal_id":"' . $statusBD->place_prodVal_id. '", '
. '"place_attr_id":"' . $statusBD->place_attr_id. '", '
. '"count_places":"' . $statusBD->count_places. '", '
. '"bilet_session_place":"'. $bilet->session_place. '", '
. '"bilet_status":"' . $bilet->status. '", ' // active, visited, refunded, canceled*
. '"bilet_session_event_id":"'. $bilet->session_event_id. '", '
. '"bilet_session_date":"'. $bilet->session_date. '", '
. '"content":" ' . addslashes(json_encode ($html)) . '" '
. '}';
echo '{'
. '"status_code":"' . $statusBD->status_code. '", '
. '"status_date_added":"' . $statusBD->status_date_added. '", '
. '"status_title":"' . htmlspecialchars($statusBD->status_title). '", '
. '"order_id":"' . $statusBD->order_id. '", '
. '"order_item_id":"' . $statusBD->order_item_id. '", '
. '"event_id":"' . $statusBD->event_id. '", '
. '"date_event":"' . $statusBD->date_event. '",'
. '"place_price":"' . $statusBD->place_price. '", '
. '"place_velue_id":"' . $statusBD->place_velue_id. '", '
. '"place_status_title":"' . htmlspecialchars($statusBD->place_status_title). '", '
. '"place_status_code":"' . $statusBD->place_status_code. '", '
. '"place_prodVal_id":"' . $statusBD->place_prodVal_id. '", '
. '"place_attr_id":"' . $statusBD->place_attr_id. '", '
. '"count_places":"' . $statusBD->count_places. '", '
. '"bilet_session_place":"'. $bilet->session_place. '", '
. '"bilet_status":"' . $bilet->status. '", ' // active, visited, refunded, canceled*
. '"bilet_session_event_id":"'. $bilet->session_event_id. '", '
. '"bilet_session_date":"'. $bilet->session_date. '", '
. '"content":" ' . addslashes(json_encode ($html)) . '" '
. '}';
<meta http-equiv="Content-Security-Policy" />
Да у меня там JSON длинный. А создавать новый массив для сериализации как то не хочется.
Тем более это вопрос экранирования и очистки.