Reputation: 33
$body = "Artist: " + $artist + "Size: " + $size + "Time: " + $time + "Concept: " + $concept + "Time: " + $time + "Mod: " + $mod + "Details: " + $details;
When I try to echo this variable, all that comes out is '16.'
Can you guys help?
Upvotes: 0
Views: 42
Reputation: 57703
In PHP the concatenation operator is .
, not +
So:
$body = "Artist: " . $artist . "Size: " . $size . "Time: " . $time . "Concept: " . $concept ."Time: " . $time . "Mod: " . $mod . "Details: " . $details;
Upvotes: 1
Reputation: 219884
The concatenation operator in PHP is the .
not the +
$body = "Artist: " . $artist . "Size: " . $size . "Time: " . $time . "Concept: " . $concept . "Time: " . $time . "Mod: " . $mod . "Details: " . $details;
Upvotes: 4