How do I combine variables/text?
Posted: Fri Apr 25, 2003 2:39 pm
I've been looking and looking and cannot seem to find how to do this at php.net. I just want to create a variable that combines (not mathematically) several variables and text together.
For example:
$variableA = "sample1"
$variableB = "sample2"
$combo = "VariableA=" & $variableA & "&VariableB=" & $variableB;
I want the $combo variable to produce this: "VariableA=sample1&VariableB=sample2"
Using the "&" character to combine them works in ASP, but I can't find how to do this in PHP. Please help.
For example:
$variableA = "sample1"
$variableB = "sample2"
$combo = "VariableA=" & $variableA & "&VariableB=" & $variableB;
I want the $combo variable to produce this: "VariableA=sample1&VariableB=sample2"
Using the "&" character to combine them works in ASP, but I can't find how to do this in PHP. Please help.