<?php # Null Coalescing Assignment Operator # OLD WAY (PHP < 7.4 ) $data['comments']['user_id'] = $data['comments']['user_id'] ?? 'PlaceHoldered value...'; var_dump($data['comments']['user_id']); $data = null; # PHP 7.4 + syntax to use new assigment operator without unecessary tests. $data['comments']['user_id'] ??= 'PlaceHoldered value...'; var_dump($data['comments']['user_id']);
You have javascript disabled. You will not be able to edit any code.