Activity Stream
48,167 MEMBERS
6939 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 5 of 5
  1.     
    #1
    Member

    Default Little PHP question

    Hello guys,

    Maybe you can help me with a little question about PHP...
    Im starting to program myself, and Im now making one of my websites multi-language.

    Can I use this code inside the <title> tags?
    PHP Code: 
    <title><?php echo $lang['TITLE']; ?></title>
    And this in meta tags?
    PHP Code: 
    <meta name="description" content="<?php echo $lang['DES']; ?>" />
    <meta name="keywords" content="<?php echo $lang['KEY']; ?>" />
    Is thos good, bad or equal for SEO?
    I just dont want to screw my website position on search engines... :-)

    Sorry for the newbie question..

    --------------------------------
    EDIT
    --------------------------------

    Btw, Im adding this code in the top of my php files:
    PHP Code: 
    <?php include("lang/en.php");?>
    Im doing this well?
    Or is better to use this?
    PHP Code: 
    <html lang="en-US" ... 
    Or this is not to use to use multi language?

    If yes, what is the code to show the text that I want?

    Thanks!
    Divvy Reviewed by Divvy on . Little PHP question Hello guys, Maybe you can help me with a little question about PHP... Im starting to program myself, and Im now making one of my websites multi-language. Can I use this code inside the <title> tags? <title><?php echo $lang; ?></title> And this in meta tags? <meta name="description" content="<?php echo $lang; ?>" /> Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    The way you have is fine. But for the language you need both . The words are located in the appropriate php file and in the html lang you tell the browser what language you are using.

  4.     
    #3
    Member
    Website's:
    PulsedMedia.com
    as long as it's processed as PHP, yes definitively.
    shorthand even: <?=$lang['DES'];?> might work, depending upon configuration you have.

  5.     
    #4
    Member
    Thank you guys!

  6.     
    #5
    Respected Member
    You are welcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. <?php tag question
    By Porsche_maniak in forum Web Development Area
    Replies: 7
    Last Post: 1st Feb 2012, 10:35 PM
  2. DLE question
    By Divvy in forum Webmaster Discussion
    Replies: 4
    Last Post: 2nd Apr 2011, 03:00 PM
  3. Replies: 5
    Last Post: 3rd Jan 2010, 05:23 PM
  4. question
    By priviet02 in forum Hosting Discussion
    Replies: 2
    Last Post: 24th Sep 2009, 02:07 PM
  5. Question!
    By Luke in forum General Discussion
    Replies: 8
    Last Post: 23rd Sep 2009, 03:30 PM

Tags for this Thread

BE SOCIAL