0

Why is the <br/> not working ?

I would like to include a line break on each output but am getting an error. What could be wrong in the code ? <?php $nee = ['hasu', "John", "richard", "young", "vayo"]; foreach($nee as $x){ echo($x '<br/>'); } ?>

26th Aug 2017, 8:36 AM
Peter
Peter - avatar
2 odpowiedzi
+ 3
echo $x.'<br/>'; The parentheses aren't needed. Use the . for concatenation of $x and the string '<br/>'
26th Aug 2017, 8:40 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
thank you very much.
26th Aug 2017, 8:42 AM
Peter
Peter - avatar