Hello, I'm trying to put some php in a web page title (after the text part of the title), so that it will number each page differently in the title. Whats the best way to do it? Is there some sort of taboo against putting too much code in the <title></title> of the page? Or is it anything goes as long as it isn't too rediculous. Heres the part of the code that determines what page number it is. In the browsers output all I am getting is all this code in the title though, instead of just 1, 2, etc. or whatever page it is on. Whats the proper way to put
$_SERVER['PHP_SELF'] into a text area and not a text link? Please let me know, thank you very much.
<?php // Build Page Number
if($page > 1){
$prev = ($page - 1);
echo " <span\"".$_SERVER['PHP_SELF']."?page=$prev\"><<Previous</span> ";
}
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<span\"".$_SERVER['PHP_SELF']."?page=$i\">$i</span> ";
}
}
if($page < $total_pages){
$next = ($page + 1);
echo " <span\"".$_SERVER['PHP_SELF']."?page=$next\">Next>></span>";
}
?>