Generating the title of a page in PHP

output the content of the title

1 option

<script language=javascript>
window.top.document.title=”TEXT”
</script>
<title>{title}</title>

option 2

<?php
############# generating a header
function title($pagename,$all)
{
global $SITE;

##### we output the header through the lark if $all == no
if($all == “no”):

$pagename = strtolower($pagename);

#### this is for convenience, we make a capital letter
$pagename[0] = strtoupper($pagename);

### withdrawal via lark
print”<script language=javascript>”;
print”window.top.document.title=\”$SITE[comp] ::$pagename\””;
print”</script>”;

##### output the name of the section if all == one
elseif($all == ‘one’):
$pagename = strtoupper($pagename);
print”<b>$pagename</b>”;

##### output everything if $all == yes
elseif($all == ‘yes’):
$pagenametop = strtolower($pagename);
$pagename = strtoupper($pagename);
$pagenametop[0] = strtoupper($pagename);

print”<script language=javascript>”;
print”window.top.document.title=\”$SITE[comp] :: $pagenametop\””;
print”</script>”;

print”<b>$pagename</b>”;
endif;
}

?>

And then in the html5 document, where you need to output the title, insert

<?=title(“text”,”yes”)?>

Check Also

CashWars roulette script

CashWars roulette script

CashWars roulette script Password is the word password ➜ [ᴠɪᴘ] ᴅᴏᴡɴʟᴏᴀᴅ ᴅᴏᴡɴʟᴏᴀᴅ ɪs ᴀᴠᴀɪʟᴀʙʟᴇ ꜰᴏʀ …

Leave a Reply

Your email address will not be published. Required fields are marked *