Results 1 to 3 of 3

Thread: defining with php??

  1. #1
    Join Date
    Oct 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default defining with php??

    Hi guys,

    I'm trying to display dynamic page titles depending on what picture a person is viewing.

    I've got a header.inc file which prints the title if defined and then something else if its not:

    <?php define ('TITLE')) {
    print TITLE;
    } else {
    print 'not defined';
    }
    ?>

    then...... I have another page where i have:

    <?PHP
    define ('TITLE', 'page name');
    ?>

    but its not defining it.. this second page is a .tpl extension would that have any affect on my results?

    Thanks in advance

  2. #2
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    defined() is the function you use to check if a constant has been defined.

  3. #3
    Join Date
    Apr 2008
    Location
    Limoges, France
    Posts
    395
    Thanks
    13
    Thanked 61 Times in 61 Posts

    Default

    Post more of your code please.

    How and where are the titles entered?

Bookmarks

Posting Permissions

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