include variable to html title [duplicate]

This question already has an answer here:

config.php ( edited but still have same problems ):

<?
$judul ="my site title";
?>

my index.php:

<?php
session_start();
include('config.php');
mysql_connect($server,$login,$pass) or die("Nggak bisa koneksi");
mysql_select_db($db);
$fail = "&nbsp;";
 ?>

<title><? echo "$judul"; ?></title>
</head> 

the result is my website title is

<? echo "judul; ?>

not like i want to…

Is there anything that I should change?
the goal is:
I want to put some variable like footer copyright title inside config.php so if I need to edit it’s only need to edit config.php

—-edited—-
by the way thank you for all answer
it is work now

i use @Tanuel comment

once again thankyou

i vote answer ( green checklist ) based on the first answer, since i use syntax from comment

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s