Hi everyone,
I am new in PHP. I have this function which convert all alphabetic characters to uppercase:
1 2 3 4 5 6 7 8 9 | function UppercaseText($text_list) { foreach($text_list as $text) { $BigText[] = strtoupper($text); } return $BigText; } $text_list = ['the', 'train', 'was', 'late']; var_dump(UppercaseText($text_list)); |
the code work well and I have this returned string in table BigText[]:
1 2 3 4 5 6 7 8 9 10 11 | array(4) { [0]=> string(3) "THE" [1]=> string(5) "TRAIN" [2]=> string(3) "WAS" [3]=> string(4) "LATE" } |
How to change this code so I have variable which contain this value :
1 2 | "THE TRAIN WAS LATE" |
Thank you very much
Hi,
This is the syntax to concatenate strings:
For your code, use this:
Have a good day