Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

problem in function with $MenuTitle


Reply


2 Posts   1121 Views

Avatar
ojalà

Community Member, 87 Posts

15 October 2008 at 3:53am

HI!
I waht to usea function in Page.php to print only 3 entry of $MenuTitle.
So I use this code:

function Ciclo_menu()
   {
      $array = $MenuTitle;
      for($i=0;$i<3;$i++)
      $nuovo_menu = $array[$i];
      return $nuovo_menu;

   }

something is wrong, is it possible to use $menuTitle varable in Page.php function?

Avatar
Willr

Forum Moderator, 5513 Posts

15 October 2008 at 1:16pm

$MenuTitle would refer to the variable $MenuTitle in that function, you need to refer to the MenuTitle on the 'Object' rather then the function by doing

$this->MenuTitle