Ok,
I manage to do that...
here is what works
<?php if(!is_null($gift['GiftPhoto']['category_id'])): ?>
<?php echo $html->link($gift['GiftCategory']['name'], '/gifts/
category/' . $gift['GiftCategory']['name']) ?>
<?php else: ?>
<?php echo ucfirst(__('no categories', true)) ?>
<?php endif ?>
thanks
chris
On Feb 6, 10:00 pm, Tilen Majerle <[email protected]> wrote:
> wtf are u trying to do??
>
> {{{
>
> if (array_key_exists($gift['GiftCategory']['name'], $yourArray)):
>
> else:
>
> endif;
>
> if (array_key_exists('controller', $this->params) &&
> $this->params['controller'] == 'gifts'):
>
> else:
>
> endif;
>
> //better choice
> if (isset($this->params['controller']) && $this->controller == 'gifts')
> {
>
> }
> }}}
>
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/2/7 [email protected] <[email protected]>
>
>
>
>
>
>
>
> > Hi guys,...
> > how u dooooing...
>
> > I need help with php statement. I'm getting an error:
> > Parse error: syntax error, unexpected ';' in /home/zipmaniak/
> > zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93
>
> > <?php if(!(array_key_exists($gift['GiftCategory']['name'])) ?>
>
> > Please some one help me with this... or if I have to call from
> > controller,... how do I do that...?
>
> > <?php if(!(array_key_exists('controller', $this->params) && $this-
> > >params['controller'] == 'gifts' ..... ---WHAT ELSE IN
> > HERE ???--- )): ?>
>
> > Thanks
> > Chris
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group
> > athttp://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php