DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
HomeRegisterMembershipsGetting StartedDomain Tools Domain EbooksSEO Software Domain Resellers Advertise

Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Coding/Programming/Languages
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 04-13-2005, 02:43 PM   #1 (permalink)
The One
 
VisualDigits's Avatar
 
Name: Lukas
Last Online: Yesterday 12:03 AM
iTrader: (39)
Join Date: Mar 2005
Posts: 1,914
DNF$: 730
Location: New Jersey
Country:


How to combine two values into one string?

I'm a php newbie and I'm working on my php based site, but got stuck abit because I want to update the page title for each page using variables from a database. So I have 2 variables: $category and $title and want them to be part of the page title so that it would look like this:
MySite.com - $category - $title.

Can anybody help find the right code? Thanks in advance.
__________________
Cogito, ergo sum!
VisualDigits is offline   Reply With Quote
Sponsored Ads
Old 04-13-2005, 03:19 PM   #2 (permalink)
Gold Lifetime Member
 
channelmaster's Avatar
 
Last Online: 08-20-2006 08:41 PM
iTrader: (0)
Join Date: Dec 2004
Posts: 10
DNF$: 125
Location: Switzerland

Send a message via MSN to channelmaster

Re: How to combine two values into one string?

... you could use it in the title-tag of the html-page with the following code
<?php echo "$category - $title"; ?>

... or did I misunderstand your problem?
channelmaster is offline   Reply With Quote
Old 04-13-2005, 08:58 PM   #3 (permalink)
The One
 
VisualDigits's Avatar
 
Name: Lukas
Last Online: Yesterday 12:03 AM
iTrader: (39)
Join Date: Mar 2005
Posts: 1,914
DNF$: 730
Location: New Jersey
Country:


Re: How to combine two values into one string?

yes, this is what I was looking for. Thanks!
__________________
Cogito, ergo sum!
VisualDigits is offline   Reply With Quote
Old 04-14-2005, 12:31 AM   #4 (permalink)
Gold Lifetime Member
 
channelmaster's Avatar
 
Last Online: 08-20-2006 08:41 PM
iTrader: (0)
Join Date: Dec 2004
Posts: 10
DNF$: 125
Location: Switzerland

Send a message via MSN to channelmaster

Re: How to combine two values into one string?

no problem at all.
channelmaster is offline   Reply With Quote
Old 04-16-2005, 11:17 AM   #5 (permalink)
Account Terminated
No Avatar
 
Last Online: 07-08-2008 04:27 AM
iTrader: (17)
Join Date: Mar 2005
Posts: 234
DNF$: 1,403
Location: Canarian Islands

Send a message via MSN to luvkycool Send a message via Yahoo to luvkycool

Re: How to combine two values into one string?

<title><?php echo $category .'-'.$title;?></title>

is faster.
luvkycool is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:35 PM.
Copyright @2001-2009 DNForum.com