PHP page title

  User-1297335 01:02 29 Sep 08


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

$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?


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";

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

Any help would be appreciated

  beynac 11:40 29 Sep 08

This may help:

click here

  beynac 11:41 29 Sep 08

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.

Qualcomm Snapdragon 835 benchmarks: Antutu, Geekbench 4, GFXBench and PCMark results

1995-2015: How technology has changed the world in 20 years

This stop-frame animation tells a moving story of domestic violence for Refuge

New iPad 2017 preview: Apple's affordable but underspecced new iPad may appeal to the education…