Log in

View Full Version : defining with php??



jmh1988
11-01-2008, 07:42 PM
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

techietim
11-01-2008, 08:00 PM
defined() (http://php.net/defined) is the function you use to check if a constant has been defined.

JasonDFR
11-01-2008, 10:42 PM
Post more of your code please.

How and where are the titles entered?