Tuesday, November 8, 2011

Re: Parse error: syntax error, unexpected T_ELSE error?

On Nov 8, 1:08 pm, shmeg <intertelaustra...@gmail.com> wrote:
> Can anyone tell my why this works:
>
> <?php
> if($facebook_user)
>         echo $this->Facebook->logout();
> else
>         echo $this->Facebook->login();
> ?>
> <p>
> <?php echo debug($facebook_user); ?>
>
> but this produces the an error (Parse error: syntax error, unexpected
> T_ELSE in /home/worldtri/public_html/testapp/views/pages/home.ctp on
> line 8)
>
> <p>
> <?php
> if($facebook_user)
>         echo $this->Facebook->logout();
>         echo debug($facebook_user);
> else
>         echo $this->Facebook->login();
> ?>
>
> <p>
>
> With thanks for any and all explanations.
> Benjamin.

You've accidentally let the cake mixture spill out of the php tin.

AD

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate