In PHP, strings are concatenated together as follows:
$foo = \"Hello\"; $foo .= \" World\";
Here, $foo becomes \"Hello World\"
$foo
I wanted to build a string from a list. Couldn't find an answer for that so I post it here. Here is what I did:
list=(1 2 3 4 5) string='' for elm in "${list[@]}"; do string="${string} ${elm}" done echo ${string}
and then I get the following output:
1 2 3 4 5