Parse error: syntax error, unexpected '=' in path/to/filename.php on line
Parse error: syntax error, unexpected '=' in path/to/filename.php on line xxxIt is usual to get cryptic error messages when executing php code. It is not intentional but essentially it tells us that the code is not right in just about the indicated area.
Take a look at the sentence given below.
variable ="select item from my_images where id =$key";
We will have to look a little ahead and a little behind the "=" symbol, in this case.
But, if you analyse the php program statement carefully, you will notice that you have forgotten to place the mandatory $ sign, which indicates that the word is a php variable.
This is a common error in php.
Place the $ sign before the variable name and all things seem okay.