Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   forgot how to insert a space in a variable (http://www.go4expert.com/forums/forgot-insert-space-variable-t435/)

Mike 4Sep2005 12:29

forgot how to insert a space in a variable
 
I forgot how to insert a space in a variable. The code below displays two database variables side by side, like "FirstNameLastName" How can I insert a space so it displays "FirstName LastName"?

$Name = $FirstName.$LastName;

shabbir 4Sep2005 20:36

Re: forgot how to insert a space in a variable
 
$Name = $FirstName.' '.$LastName;

coderzone 4Sep2005 20:39

Re: forgot how to insert a space in a variable
 
$Name = "$FirstName $LastName";

The above option is also there but the better one is already told by Shabbir.

Mike 20Sep2005 19:48

Re: forgot how to insert a space in a variable
 
simple, simple haha


All times are GMT +5.5. The time now is 18:34.