problem with "->" in php code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sonofbc
Forum Newbie
Posts: 3
Joined: Thu Nov 26, 2009 9:38 am

problem with "->" in php code

Post by sonofbc »

I seem to have a problem with PHP assembling code when it encounters the assignment operator (->). My codes acts like I entered a ?> to end a PHP code sequence. It then starts printing the code on the screen until it encounters a new <?php code block. If I do not use and object assignment operators like '->' then everything works as normal. Anyone else run into this problem?

Thanks
Sam
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: problem with "->" in php code

Post by pickle »

Never have. If you post the relevant code we may be able to figure it out.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
JNettles
Forum Contributor
Posts: 228
Joined: Mon Oct 05, 2009 4:09 pm

Re: problem with "->" in php code

Post by JNettles »

What version of PHP are you running? You also might check your string openings/closings to make sure that you aren't outputting code in your string.
Post Reply