Using Static Class Variables -- In A Heredoc
I set up a class, which simplified is this: class Labels { static public $NAMELABEL = 'Name'; } I successfully got the following code to work fine: echo '
Solution 1:
Interpolation in heredocs works the same as in double quotes, so you can use curly brace ("complex") syntax.
However the parser does not recognize static class variables (see previous documentation). In order to refer to static class variables, you will need to set them locally as follows:
$label = Labels::$NAMELABEL;
echo <<<_END
<formaction="index.php"method="post"><pre>
$label : <inputtype="text"name="author" /><inputtype="submit"value="ADD RECORD" /></pre></form>
_END;
As A Row
I need your help, if the following code below counts every …
How To Make A Transition Effect Up The Input On Change
I need to place this particular effect on a dropdown I need…
Some Questions About Tree Construction [html Spec]
I know that it's not customary to ask a bunch of questi…
Post a Comment for "Using Static Class Variables -- In A Heredoc"