Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    62
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Activating a Variable

    How to be a make a variable 'happen'? Here's the problem:

    PHP Code:
    <?php include('./$language'); ?>
    The variable is specified in a page called 'above.inc' which is included into the page that I have the above code on. Why does it choose to include '$language' and not the properties of the actual variable? I know that the echo function activates variables but I couldn't think of a way to use that to include the 'language' variable.

  • #2
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    Single quoted strings are not parsed in PHP, double quoted strings are.

    PHP Code:
    <?php include("./$language"); ?>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •