Re: need help with passing into Element

2008-08-21 Thread rocket
good to know danke On Aug 21, 7:15 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > What Fahmi said. > > with > > echo $this->renderElement('post_element', $post); > > You are creating a variable in the element called $post_element (with > the value of $post) > > The only reason its working for you

Re: need help with passing into Element

2008-08-21 Thread RichardAtHome
What Fahmi said. with echo $this->renderElement('post_element', $post); You are creating a variable in the element called $post_element (with the value of $post) The only reason its working for you at the moment is that you have already created a variable in the view called $post: foreach($po

Re: need help with passing into Element

2008-08-21 Thread Fahmi Adib
i think you should use an array, array('post' => $post) On Aug 21, 2008, at 2:56 PM, rocket wrote: > > hey guys im passing this: > > foreach($posts as $post) > echo $this->renderElement('post_element', $post); > } > > > but in my post_element i try to use > > $post['t

Re: need help with passing into Element

2008-08-21 Thread rocket
OMG i fixed it it was a freaking CAPS issue!!! i was trying to access $post but it was $Post. wtf! On Aug 21, 3:56 am, rocket <[EMAIL PROTECTED]> wrote: > hey guys im passing this: > >         foreach($posts as $post) >                 echo $this->renderElement('post_element', $post); >        

need help with passing into Element

2008-08-21 Thread rocket
hey guys im passing this: foreach($posts as $post) echo $this->renderElement('post_element', $post); } but in my post_element i try to use $post['title'] and it throws me this problem Notice: Undefined variable: Am i missing something? i'm real confused