I like to make the following.
(1) If $myVariable is already set, The value of $myVariable is the value which is already set.
(2) If $myVariable is not yet set, The value of $myVariable is “myVar”
(3) Print the value of $myVariable.
I wrote the code below for it.
<?php
if (isset($myVariable) )
{$myVariable==$myVariable}
else {$myVariable="myVar"};
echo $myVar
?>
The temperal URL http://dot.kr/x-test/if.php which has the code above causes Parse error: syntax error, unexpected ‘}’ in …\if.php on line 3 .
Is the code above right on the track?
How can I fix the Parse error?