PHP variables showing outside <title> tag but not inside
-
I’m running a news site at casinoupdate.co.uk and as part of it, I’ve written a simple tool which is based on passed variables from an input page (see example page at https://www.casinoupdate.co.uk/country-results/?country=Argentina).
Now Google webmaster is saying that this tool is producing duplicate short titles so I want to add the country variable to the title using …
$country = $_REQUEST['country']
and adding $country to the
<title>
tag inheader.php
using a conditional statement based onisset
, as in …if (isset($country)){ echo $country . ": "; }
to produce, for example …
<title> Greenland: Gambling is .. | CasinoUpdate.co.uk <title>
but it doesn’t show up!
What makes it more puzzling is that if the statement is placed before the
<title>
tag it DOES appear.Can anyone tell me what’s going on?
- The topic ‘PHP variables showing outside <title> tag but not inside’ is closed to new replies.