I visit my page www.mysite.com/theme/test/index.php
which contains the code below. I expect to see the word test
inside the h1
but it is blank :-( Can someone explain where I've gont wrong?
<?php
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if ((false !== strpos($url,'theme')) || (false !== strpos($url,'colours'))) {
if(preg_match("/\/(\d+)$/",$url,$matches)) { $end=$matches[1]; }
?>
<div class="row">
<div class="medium-12 columns">
<h1 class="page-title"><?php echo ucwords(str_replace("-"," ",$end)); ?></h1>
</div>
</div>
<?php
}
?>
Thank you