This is my first PHP if statement so bear with me if I have made a silly mistake!
I am running pmWiki and have a two variables for the Group names. $Group is the group name without spaces (EasyCatalog for example) and $Groupspace is the group name with spaces (Easy Catalog for example).
I want to check if $Groupspaced == "Easy Catalog", if true then return the $Group variable, else return $Groupspaced
This is my code:
<p class="grouptitle">
<?php if ($Groupspaced == "Easy Catalog") : ?>
<a href='{$ScriptUrl}/{$Group}' class="pagegroup">{$Group}</a>
<?php else : ?>
<a href='{$ScriptUrl}/{$Group}' class="pagegroup">{$Groupspaced}</a>
<?php endif; ?>
</p>
The problem I am having is that it is returning both links not one.