Page 1 of 1

help with multiple arrays

Posted: Mon Jun 01, 2009 9:34 am
by niravdave
hi Guys,

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);
 
 
 
please help
dave

Re: help with multiple arrays

Posted: Sun Jun 28, 2009 5:35 pm
by a94060
wrong forum. This should be in PHP - Code