I am trying to change the value of a php variable when the user clicks a html li element which has been generated using php. I am not getting an error but it doesn't appear that the variable is changing. Is there something wrong with the below code? Note it is inside a php file within php tags. Thanks.
$testvalue = "a";
echo '<li onClick="'.$testvalue.' = \''."b".'\' ">test</li>';
Edit: I fixed it! Super happy. I was able to use javascript to parse the variable where I needed it before the php function was called. Thanks for the help guys...or girls (probably not :) )