inclde file via lang file?

Discussion in 'PHP' started by Drew007, Oct 8, 2008.

  1. #1
    Hello. I have a php page that I would like to use the include statement and within that statement use info from my lang file to get the include address. Something like this:

    <?php include ("echo $lang['webaddress']/inc/officehours.html") ?>
    PHP:
    This screws up the entire page (won't load). Can someone please let me know how to do this?

    Thanks in advance!
     
    Drew007, Oct 8, 2008 IP
  2. mehdi

    mehdi Peon

    Messages:
    258
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    have you tried:
    <?php include ($lang['webaddress']."/inc/officehours.html"); ?>
    PHP:
     
    mehdi, Oct 8, 2008 IP
  3. Drew007

    Drew007 Peon

    Messages:
    310
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    mehdi,

    Thanks, but that is not working either. :)
     
    Drew007, Oct 8, 2008 IP
  4. mehdi

    mehdi Peon

    Messages:
    258
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    are u sure this variable in your lang file exists?
     
    mehdi, Oct 9, 2008 IP