Jump to content

Merge Variables


Carl
 Share

Recommended Posts

If you want to "merge" numbers, use:

$final = $var1 + $var2

If you want to "merge" strings, use:

$final = $string1 & $string2

In your example, you would do this:

$newvariable = $variable1 & "test" & $variable2

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Link to comment
Share on other sites

If you want to "merge" numbers, use:

$final = $var1 + $var2

If you want to "merge" strings, use:

$final = $string1 & $string2

In your example, you would do this:

$newvariable = $variable1 & "test" & $variable2
Thanks, I couldn't find that.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...