title: How to use php variables in HTML form
body: <p>I want to generate a simple html form and add some text box to it, then I want to define some php variables and use them as value for text boxes but when I try to use them it does not work and the value of variable would not be set for the text box. Would you please tell me about the correct syntax and the way for doing this</p>
  
  <pre><code>&lt;?php
  $foo = 123;
  ?&gt;
  
  &lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form Id='Form' Method='post' Action='http://example.com'&gt;
              fooElement&lt;input type='text' name='fooElement' value='&lt;?= $foo ?&gt;'/&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How can i set the value of foo variable as the value for foo element?</p>