javascript - Assign a jquery value to text inside the same PHP passage -
It currently resides in some web pages in the web page source:
echo (" & Lt; span class = \ "somevalue \" & gt; & lt; / span & gt; "); This works, the value is expressed on the page where the PHP instructions are applied. But now - instead of announcing an echo () - how can it be assigned a text variable that I can use somewhere else in PHP? Thanks for any help.
You can specify the string in a variable
$ mySpan = "& Lt; span class = \" somevalue \ "& gt; & lt; / span & gt;"; and then echo the variable later in the code anywhere in the code. You can define $ mySpan at the top of the script or you can define it in a separate file and you can include that file in another file, you will need the variable.
Comments
Post a Comment