Jump to content


Photo

Using Variables


  • Please log in to reply
2 replies to this topic

#1 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 25 June 2006 - 02:36 PM

Hey, I was starting using php again and I don't remember how can I use this option of Variables:

$x = "abc";
$x. = "def";
echo $x;

display:

abcdef


but I don't get the display, I get an error;
Parse error: parse error, unexpected '=' in C:\apache2\htdocs\down.php on line 3

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 25 June 2006 - 02:38 PM

Your space is in the wrong place:

$x .= "def";

The . and = should be "touching"

#3 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 25 June 2006 - 02:39 PM

Thanks mate :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users