I'm having problems using array that I cannot figure out at all,
I have a small class, Category, theres two methods(of concern) which are defined as:
Code: Select all
function add($link, $name)
{
$this->$pages[$link] = $name;
}
function hasPage($page_link)
{
return !empty($this->$pages[$page_link]);
}Code: Select all
$dev = new Category;
$dev->catPage("dev");
$dev->add("bugs", "Bugs List");
$dev->add("history", "History");
$dev->add("todolist", "Todo");
$dev->add("docu", "Documentation");
$categories['Development'] = $dev;
$down = new Category;
$down->catPage("download");
$categories['Download'] = $down;Can anybody please help me, thankyou!