PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
szms
Forum Contributor
Posts: 101 Joined: Thu Jun 26, 2003 12:23 pm
Post
by szms » Fri Aug 15, 2003 9:30 pm
Hi there!!
Here is my two string variables:
$var1 = "Monday";
$var2 = "Friday";
I want to print $var1 & $var2 so that there will be two white space in between.
i.e. Monday Friday
Can you plase help me?
Drachlen
Forum Contributor
Posts: 153 Joined: Fri Apr 25, 2003 1:16 am
Post
by Drachlen » Fri Aug 15, 2003 10:55 pm
echo "$var1 $var2";
two spaces inbetween..
nigma
DevNet Resident
Posts: 1094 Joined: Sat Jan 25, 2003 1:49 am
Post
by nigma » Sat Aug 16, 2003 12:11 pm
Or
print "<pre>$var1 $var2</pre>";
m3rajk
DevNet Resident
Posts: 1191 Joined: Mon Jun 02, 2003 3:37 pm
Post
by m3rajk » Sat Aug 16, 2003 2:57 pm
or
(but that one display right in html)
Moonspell
Forum Newbie
Posts: 21 Joined: Tue May 13, 2003 4:54 pm
Post
by Moonspell » Sat Aug 16, 2003 10:10 pm
print $var1." \; ".$var2;
I believe you need the \ for the ;
Coco
Forum Contributor
Posts: 339 Joined: Sat Sep 07, 2002 5:28 am
Location: Leeds, UK
Contact:
Post
by Coco » Sun Aug 17, 2003 6:34 am
wasnt aware ; had to be escaped in strings
thought it was just ' " and $