[eluser]Bl4cKWid0w[/eluser]
I am having some trouble with the anchor function. I have loaded the function in my main.php controller and am using the link in my main_view.php view. My links are stored in my database so I use a query to gather the information. I have a table for link "categories" and then another table for the actual links which contain a row that says which category they go under. I use the following code in my main_view file to gather the information:
Code:
<?php
$this->load->helper('url');
foreach($navquery->result()as $row){
echo "$row->categoryName<br>";
$query = $this->db->query("SELECT * FROM navlinks WHERE categoryID = '".$row->categoryID."'");
foreach($query->result() as $link){
$link = anchor($link->linkDesination, $link->linkName);
echo "<li>$link</li>";
}
}
?>
The link itself displays fine, except for the fact that there's a huge error message above each of the links. This is the error that I am getting:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$linkDesination
Filename: views/main_view.php
Line Number: 27
Anyone have any ideas?