Forum Moderators: coopster
The name of a city is displayed like this:
<?php echo $xcityid>0?"$xcityname":$xcountryname;?>
In the script cities are arranged under regions, and when the region page is viewed this is appended to the URL:
?cityid=-1
When a city is viewed, the url has something like?cityid=20
I want to have it so that if it is a region that is being viewed, its name is not displayed, but instead "My Text" is displayed.
I have tried this:
if ( $cityid = -1 )
{echo "My Text";}
else
{ echo $xcityid>0?"$xcityname":$xcountryname; }
The outcome is that 'My Text' is displayed on all pages and the city name never appears.
Can anyone suggest anything?
All down to personal preference really. I use them all the time as it can minimalize coding blocks and keep things tider.
dc