Could it be that I’m missing something very obvious here?
How is it that print ucwords(strtolower($keycode)) . " Preview Page" only returns the $keycode as title, but not the trailing ” Preview Page” that’s supposed to be there too?
<?php
$title = ((isset($keycode)) ? print ucwords(strtolower($keycode)) . " Preview Page" : print "Home Page"); ?>
<title><?php echo $title; ?></title>
I’ve even tried print ucwords(strtolower($keycode . ' Preview Page')) just to work it in there, but that didn’t change anything. It only seems to see the variable…
Does anybody know how to get this to work? :o) Help please? Thank you for your time.
the problem is that you are echoing the result of a call to
printwhich is just anintI think… Anyway,printandechoboth have the effect of outputting the string. You just need to lose theprints so: