The array starts here:
public $link = array();
Keys and values are assigned through the following function:
public function build_links(){
$this->link['career'] = $_SERVER['PHP_SELF'].'?p_id=13';
$this->link['news'] = $_SERVER['PHP_SELF'].'?p_id=14';
}
The value is used in following way:
<a href="<?php $this->link['news']?>">news</a>
The link should come up with "p_id=14" but its coming with "p_id=1" even though that value was never assigned and the PHP file is not returning any error. I dont know this is happening. Little help here would be highly appreciated. Thanks.
you missed to echo it, change to:
<a href="<?php echo $this->link['news']; ?>">news</a>