Combining Variables [PHP]

Hiya, sorry to ask such a silly question, but as many know my php knowledge is kinda slim

How do i combine several variables to send in my mail object?


$name = $_GET['name'];
$address = $_GET['address'];
$city = $_GET['city'];
$apt = $_GET['apt'];
$state = $_GET['state'];
$zip = $_GET['zip'];

I don’t know why I just can’t say


$myVar = $name, $address, etc ;

I tried numerous ways of doing this and just can’t get it right

Tanks!

you can say this:

$myVar = "$name, $address";

omg so because i didn’t have " ", that’s why? lol thanks man:)

Yeah "s in PHP seriously suck…

no they don’t. in flash, you would have to go like

myVar = name+", "+address+", etc..";

which does suck =)

Well I always manage to completely misplace them or forget one or something and they bug me.

The most annoying thing I find about PHP is it uses . for string concatenation, instead of the + used in Flash.

Now when I’m working mainly with PHP, I find myself using +, and when I’m working in Flash I find myself writing . :trout: