How can I concatenate two variables as strings? For example,
PHP Code:$a = "asdf";
$b = "ghjk";
fwrite($theFile, ???); //want to have asdfghjk
Printable View
How can I concatenate two variables as strings? For example,
PHP Code:$a = "asdf";
$b = "ghjk";
fwrite($theFile, ???); //want to have asdfghjk
you can try" join($a,$b) "
actually that would be
I think that would work since I didn't see any other function that would do it besides implode(), which is the same.PHP Code:$a = "asdf";
$b = "ghjk";
$c = join("",$a$b)
fwrite($theFile, $c); //want to have asdfghjk
That can be simplified:
Code:$a = "Hello ";
$b = "World";
$c = $a . $c;
//or
$a = "Hello";
$b = "World";
$c = "$a $b";
I was thinking that but wasn't sure if that would work, :p
Cool, thanks guys :)