Someone helped me with this code, but I need futher help. I am using this code to pull some information for subcategories on my pages.
I want to implement this code in the meta section for Title, Keywords & description for seo, so i can write my customised title, keyword and description for each subcategory. I believe there will be 3 arrays involved, i tried my best but failed. help much appreciated. As an appreciation token, I will buy you a beer.
Code: Select all
$Title = array();
function AddTitle($ID,$TitleTxt)
{
global $Title;
$Title[$ID]=$TitleTxt;
}
function GetTitle($ID)
{
global $Title;
return $Title[$ID];
}
AddTitle(1,'This is for subcategory one.');
AddTitle(2,'This is for subcategory two');
AddTitle(3,'This is for subcategory three');
echo GetTitle($xsubcatid);
dave