Thanks guys, Looks like I it was just a missing an <?php endif ?> at the end.
Like I said... I'm dumb :P Thanks for you time once again. Dave -----Original Message----- From: Dave Maharaj :: WidePixels.com [mailto:[email protected]] Sent: September-27-09 8:04 PM To: [email protected] Subject: RE: Im dumb...help! I have the same idea set up in the admin for the user but its in reverse and it works fine. <?php if (empty($user['Post']) && empty($user['Favorite']['id'])): ?> <p>You have no favorites or Contributing Posts.</p> <?php else: One or both are not empty so show data Show the posts and favorites..... But what I am working on now if its empty its just empty, show nothing <?php if (!empty($user['Post']) || !empty($user['Favorite']['id'])) ?> Either or both have data so show the user their info....if both are empty do nothing. Dave -----Original Message----- From: Dave Maharaj :: WidePixels.com [mailto:[email protected]] Sent: September-27-09 7:46 PM To: [email protected] Subject: RE: Im dumb...help! When I debug all the info is there a lot of data for that function but the 2 im look at for the if are both empty. [Post] => Array ( ) [Favorite] => Array ( ) -----Original Message----- From: Gonzalo Servat [mailto:[email protected]] Sent: September-27-09 7:41 PM To: [email protected] Subject: Re: Im dumb...help! On Mon, Sep 28, 2009 at 8:05 AM, Dave Maharaj :: WidePixels.com <[email protected]> wrote: > > When I test it out I know there is no data for either. > > So in the view: > <?php if (!empty($user['Post']) || !empty($user['Favorite']['id'])) ?> > <h1>Dummy title</h1> If info this should show up <?php endif ?> > > But sure enough in the view: > Dummy Title > If info this should show up What's the output of: var_dump($user) ? - GS --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
