Dynamic Title from PHP


I am new to PHP and struggling with the Dynamic Title for the webpage.

this is the webpage as an example:


As you can see the page is about HTC One Silver Mobile Phone Deals.

Currently my webpage title for this phone is: “onesilver Cheap Mobile Phone Deals with Free Gift.”

The php code I am using to get the title is:

<title><?php echo $_GET[“hs”];?> Cheap Mobile Phone Deals with Free Gift.</title>

where “hs” = model number of the mobile phone.

what I want is the full model name e.g. “HTC One Silver” in the title, not “onesilver”

I also have a php file on the server called: “model.php” in this I have

$model = array(onesilver => ‘HTC One silver’, ot1030 => ‘Alcatel OT 1030’);

Can anyone help please?


Something like this, maybe?


$models = array(onesilver => 'HTC One silver', ot1030 => 'Alcatel OT 1030'); 

if(array_key_exists($theModel, $models)){

echo $titleModel;

Thanks Force Flow.
It works perfectly fine…

You are a STAR!