Categories > TinyButStrong general >

Variable definition

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: austin
Date: 2005-02-18
Time: 03:05

Variable definition

Thanks for all of the help.
In my php, I want to define a variable based on 2 other variables.
So, here is the code:
$menu = 'Press';
$submenu = 'Dwell Magazine'
$page_title = 'Press :: Dwell Magazine';

What I want is $menu+$submenu=$pagetitle
By: Skrol29
Date: 2005-02-18
Time: 03:08

Re: Variable definition

And what is the problem?
By: austin
Date: 2005-02-18
Time: 03:26

Re: Variable definition

Well, I want to do something like this:

$menu = 'Press';
$submenu = 'Dwell Magazine'
$page_title = $menu $submenu;

But that code does not work.
By: Skrol29
Date: 2005-02-18
Time: 03:37

Re: Variable definition

Ha ok (this has nothing to do with TBS)
The string concatenation operator for Php is dot.
$page_title = $menu.$submenu;