PHP page title

  User-1297335 01:02 29 Sep 2008
Locked

Hi,

I posted this under a resolved issue below but perhaps I should have started a new subject.

My main.php page forms the structure of all my pages including the head section and basic layout. My .inc pages have the content and content structure.

The php for this is as follows

?php
$page = isset($_GET['page']) ? $_GET['page'] : 0;
$topic = isset($_GET['topic']) ? $_GET['topic'] : null;
if ($pic != null) {}
else {require_once("content/page_".$page.( $topic != null ? "_".$topic:"" ).".inc");}
?>

Is there a way for each .inc page to have its own title that is called along with the content?

Thanks

I have subsequently tried the following in the main.php page:

title> ?php if(isset($title)) { print $title; } else { print "Default Title"; } ?> /title>

and in the .inc page:

$title = "New Title";
require_once("main.php");

This works but only gives me the "Default Title" across all pages, not the "New Title"

Any help would be appreciated
Thanks

  beynac 11:40 29 Sep 2008

This may help:

click here

  beynac 11:41 29 Sep 2008

That you had also posted to that topic. That solution should work for you.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

Inside the iMac Pro - Apple's most powerful Mac yet

iMac Pro release date, UK price & specs

Football : comment regarder la Ligue 1 en direct ?