Is there a cleaner way to assign multiple strings to a single variable in php?
I current do like this
<?php
$myStr = '';
$myStr .= 'John';
$myStr .= '<br>';
$myStr .= 'Paul';
$myStr .= '<br>';
$myStr .= 'Ringo';
echo $myStr;
?>
I also use HEREDOC. But are there other ways?
'.'Paul'.'
'.'Ringo';` – Antony Jun 12 '13 at 03:29
Paul
Ringo';` :P – NullPoiиteя Jun 12 '13 at 03:30
Paul
Ringo";`? – vee Jun 12 '13 at 03:42