...

View Full Version : Something easy, no room to explain NEED HELP



Al Capone
02-13-2006, 07:55 PM
Hello and good morning :),

Right now when I use this script


<? '; echo $row['name']; echo '- ' ?><? '; echo $row['category']; echo '- ' ?>TITLE OF MY SITE

I get this when there is no 'name' or 'category'

--TITLE OF SITE

I want it so that - only shows if there is indead a 'name' or 'category'

hopfully i wasn't to confusing, any help would be greatly appriciated, thanks in advance! :)

felgall
02-13-2006, 08:05 PM
<?= $row['name'].'- '.$row['category'].'- '; ?>TITLE OF MY SITE

NancyJ
02-13-2006, 08:06 PM
<?
if($row['name'])
{
echo "{$row['name']} - ";
}
if($row['category'])
{
echo "{$row['category']} - ";
}
?> TITLE OF SITE

chump2877
02-13-2006, 08:07 PM
<?

if (!empty($row['name']))
{
echo $row['name'] . '- ' . $row['category'] . '- ';
}

?>TITLE OF MY SITE

Al Capone
02-13-2006, 08:29 PM
lol :) thanks felgall, NancyJ, chump2877



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum