php string struggle | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

php string struggle

how to change "hello world" become "hellloowrld" "iron man and mooglie" become "iirooonnmmaadgle" the idea is to sort each character by each time it come first help me!

12th Dec 2019, 11:51 AM
DarkSpeeD_BermaN7 Palace
DarkSpeeD_BermaN7 Palace - avatar
6 Answers
+ 2
There might be better solutions https://code.sololearn.com/wu8H3BRiOoy5/?ref=app
12th Dec 2019, 12:55 PM
Mystic Life
Mystic Life - avatar
+ 1
Thank you so much guys😄😄😄
13th Dec 2019, 4:47 PM
DarkSpeeD_BermaN7 Palace
DarkSpeeD_BermaN7 Palace - avatar
0
What is $newtext . Mean?? Mystic Life
13th Dec 2019, 5:28 PM
DarkSpeeD_BermaN7 Palace
DarkSpeeD_BermaN7 Palace - avatar
0
I guess you are asking about .= It is making code shorter and simpler $a .= $b; means $a = $a.$b; Check this page for details https://www.php.net/manual/en/language.operators.assignment.php
13th Dec 2019, 5:37 PM
Mystic Life
Mystic Life - avatar
0
Ok thank you 😃
13th Dec 2019, 5:40 PM
DarkSpeeD_BermaN7 Palace
DarkSpeeD_BermaN7 Palace - avatar