Page 1 of 1

Fatal error: Call to undefined function

Posted: Tue Nov 04, 2014 4:48 am
by Niraj7878

Fatal error: Call to undefined method Gallery::get_gallerycat() in D:\Tanvi\rb\db_access\Gallery.php on line 3

Code: Select all

[syntax=php]

function GetChildCategory($gallerycat_id=0 , $line = '', $cnt1='', $Selected ='') 
	{
		$category = $this->get_gallerycat($gallerycat_id);//this line getting error.
		$cnt = count($category);
		
		if($cnt)
		{
			for ($i = 0; $i < $cnt; $i++)
			{			
				$sel = ($gallerycategory[$i]['gallerycat_id']==$Selected) ? ' selected="selected"' : '';
				$str1 .= '<option value="' . $gallerycategory[$i]['gallerycat_id'] . '" ' . $sel . '>' . $line . ' '. $category[$i]['gallerycat_name'] . '</option>';
				$str1 .= $this->GetChildCategory($gallerycategory[$i]['gallerycat_id'],$line.'&nbsp;&nbsp;&nbsp;', $cnt1,$Selected);
			}
		}
		return($str1); 
	}

[/syntax]

Re: Fatal error: Call to undefined function

Posted: Tue Nov 04, 2014 6:10 am
by Celauran
OK, so the function is undefined. What's your question?