$array['something'] ? $a ?$b ? $c : '';
In 3 var there's one have value, and assign it to the array, but It doesn't work.
$array['something'] ? $a ?$b ? $c : '';
In 3 var there's one have value, and assign it to the array, but It doesn't work.
Are you looking for something like this?
$array['something'] = !empty($a) ? $a : (!empty($b) ? $b : (!empty($c) ? $c : ""));
Only one of $a
, $b
or $c
has a value and assign only that value