I describe the problem with an example: let
$actual_food['Food']['name'] = 'Tea'; $actual_food['Food']['s_name'] = 'Local';
I concatenate the above variables as follows.
$food_name = $actual_food['Food']['name']." ".!empty($actual_food['Food']['s_name']) ? "- ".$actual_food['Food']['s_name'] : "";
when I print $food_name , then output similar to '- Local' but does not print the $actual_food['Food']['name'] contents.
I think this question is very slightly stupid, but my curious mind wants to know. Thanks in advance.
source share