Jump to content

No left side assignment


jjeffman

Recommended Posts

Hello, I have not succeeded in using the Ajaxac class which clone the way Google makes its suggestion of queries. I wonder if the problem lies on the way some class methods are being called, using the equal sign without any variable on the left side of the equal sign, like

<?php  = $ajax->MethodCall(); ?>

The page at http://www.phpriot.com/articles/google-suggest-ajaxac/5 shows the PHP code to implement the class. Is there any sense on assignments with no variable on the left side ? Thanks a lot. Kind regards. Jayme Jeffman Filho

Link to comment
Share on other sites

It's not an assignment, that was a shorthand syntax for

 

<?php echo $ajax->MethodCall(); ?>

It's not recommended, and is being deprecated in PHP 6. If your PHP server is programmed with that syntax disabled it will show an error message.

Link to comment
Share on other sites

Thank you very much.

 

I have been programming in PHP for more than ten years and I have never seen this kind of code.

 

Kind regards.

 

Jayme Jeffman Filho

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...