+ 1

How to display two variables in separate lines?

28th Dec 2016, 2:56 AM
Mayur Bagul
Mayur Bagul - avatar
7 ответов
+ 4
or <?php echo $var1 .'<br>'. $var2; ?>
28th Dec 2016, 3:20 AM
CHMD
CHMD - avatar
+ 1
<div><?php echo $var1; ?></div> <div><?php echo $var2; ?></div>
28th Dec 2016, 3:02 AM
James Durand
James Durand - avatar
+ 1
used concat
29th Dec 2016, 9:48 PM
afgprogrammer
afgprogrammer - avatar
0
isnt there any easy statement for this?
28th Dec 2016, 4:00 AM
Mayur Bagul
Mayur Bagul - avatar
0
tnx king and James somehow it will help me
28th Dec 2016, 4:01 AM
Mayur Bagul
Mayur Bagul - avatar
0
Use HTML tags: <?php $var1= "hello"; $var2= "word"; echo "$var1 <br> $var2" // or echo $var1."<br>". $var2 ?> output: hello word
3rd Jan 2017, 9:16 PM
Saeed Mashhadi
Saeed Mashhadi - avatar
0
echo "hello\nworld"; or echo "$var1 \n $var2"
14th Jan 2017, 2:44 PM
Leo Tahk
Leo Tahk - avatar