Hello I have two date : Read more
Hi, This is the syntax to concatenate strings: $text1 = "hello"; $text2 = "world"; $text = $text1 . ' ' . $text2; For your code, use this: function UppercaseText($text_list) { $GlobalText = ""; $TableSize = sizeof($text_list);; for ($i = 0; $i < $TableSize; $i++) { $BigText[] = strtoupper($text_lRead more
Hi,
This is the syntax to concatenate strings:
1 2 3 4 | $text1 = "hello"; $text2 = "world"; $text = $text1 . ' ' . $text2; |
For your code, use this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | function UppercaseText($text_list) { $GlobalText = ""; $TableSize = sizeof($text_list);; for ($i = 0; $i < $TableSize; $i++) { $BigText[] = strtoupper($text_list[$i]); $GlobalText .= strtoupper($text_list[$i]); if ($i != $TableSize-1) { $GlobalText .= " "; } } //return $BigText; return $GlobalText; } $text_list = ['the', 'train', 'was', 'late']; var_dump(UppercaseText($text_list)); |
Have a good day
See less
Please use this code: $first_date = new DateTime("2022-01-01"); $second_date = new DateTime("2023-02-02"); $difference = $first_date->diff($second_date); echo "<difference> = " . $difference->y . " years, " . $difference->m." months, ".$difference->d." days " . "<difference in dRead more
Please use this code:
It works as you expect
See less