I have a function that writes meta tags... if a tag (or tags) is not
specified, then it gets a default value... is there a cleaner way to
do this?
function print_pmeta ($type)
{
if ($type["description"]) {
print '<meta name="description" content="' . $type["description"]
. '" />';
}
else {
print '<meta name="description" content="generic description" />';
}
if ($type["keywords"]) {
print '<meta name="keywords" content="' . $type["keywords"] . '"
/>';
}
else {
print '<meta name="keywords" content="generic keyword list" />';
}
}
print_meta2(array(
"description" => "A Real Description"
));
c
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php