-3

last "}" is line 762. log says "PHP Parse error: syntax error, unexpected '}' in /home/u230748479/public_html/application/controllers/api_new.php on line 762" if you need whole code ill send you. please help me. thanks.

https://drive.google.com/open?id=0B6DjyTFNtfv5SjZBM2JGNVh2V2c

link to my php file

  • Where is your code? – Sahil Gulati Mar 19 '17 at 07:26
  • You're most likely missing an opening bracket {. You'll have to make sure they are balanced. – Christopher Mar 19 '17 at 07:27
  • Use a code indenter and you'll see yourself which bracket you are missing – mehulmpt Mar 19 '17 at 07:28
  • it can either mean that it's already closed or something else that should've been closed isn't. Either way, I can't tell from this small snippet. – Asperitas Mar 19 '17 at 07:29
  • thanks to all, i added link to my file. please help me out. thanks – harsh jain Mar 19 '17 at 07:31
  • [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask) – hassan Mar 19 '17 at 07:56
  • I actually stopped scanning when I hit your poorly tabbed and formatted condition statements. Helping you would actually be rewarding bad behavior. You need to slave away at that file and properly tab and align your else statements so that you (and anyone else) can read it AND you can easily debug it. After you have tidied up your code, if you can't find the error, then post your code and we will help you. (I will remove my downvote if you fix your code.) – mickmackusa Mar 19 '17 at 08:03
  • I looked at your code, but I didn't execute it. I cannot, by inspecting the code, see any bracket that is not balanced. The code doesn't help, just like mickmackusa says. For one it isn't DRY (do not repeat yourself). I had trouble locating stuff because all methods look alike. – KIKO Software Mar 19 '17 at 08:04

1 Answers1

0

There is nothing wrong with your code, but you got 3 invalid (\u007F) characters before the } that gives the error.

This is your code

    echo "1";

    }
    // this line contains 3 invalid characters (\u007F = DELETE character)

} // this is line 762

Remove the line with the invalid characters and you should be good to go.

Tom Udding
  • 2,264
  • 3
  • 20
  • 30
  • Please don't post answers on obviously off-topic questions! [See: **Should one advise on off topic questions?**](http://meta.stackoverflow.com/q/276572/1768232) Off-topic questions can be closed and deleted, which could nullify your contribution. – John Conde Mar 19 '17 at 15:40