We help IT Professionals succeed at work.

PHP Syntax error assistance needed

error77
error77 asked
on
Medium Priority
194 Views
Last Modified: 2012-05-12
Hi all,

I have a simple code giving me and error and I don't know why...can anyone help please?

Here is the code:

<?php if ($variable_value = 'a'){ echo "checked='checked'"; } ?>

and this is the error:

Parse error: syntax error, unexpected '}', expecting ',' or ';' in

THanks

Comment
Watch Question

well for one things $variable_value = 'a' should be $variable_value == 'a' or you will be assigning 'a' to $variable_name.

Author

Commented:
Thanks :)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.