Is the following even allowed in php (or html) ?
[php]
//…
//some html form code
//…
//…
//more html form code
//…
<php
//…
goto my_label;
//…
?>
[/php]
Is the following even allowed in php (or html) ?
[php]
//…
//some html form code
//…
//…
//more html form code
//…
<php
//…
goto my_label;
//…
?>
[/php]
Evidently, I have not found how to edit posts in this forum yet.
(I am just reposting this because highlighting inside php tags did not work for me
and messed up the posted code, sorry).
[php]
//…
//some html form code
//…
//…
//more html form code
//…
<php
//…
goto my_label;
//…
?>
[/php]
anything that’s ment for the screen has to be done with either echo or print (echo is more common i would think though). Any html tags it wrongs across are treated as such, so if that label is supposed to be a html achor, then you would code is inside php like you would normally, it just happens to have echo or print infront of it.
I am not sure if I understand your comment.
I am concerned with php program flow control.
If I use php statement “goto”, it needs a label that marks a place to go to;
for example " goto here". Then, label “here” is placed somewhere in the code.
When html code is inside .php file, can I jump to inside of the html code to continue program execution from there ?
yep. Because its not going to hit that code until its told to.