title: How to embed if statement inside echo
body: <p>I'm gettin' a headache on that. I need to put if statement inside an echo (this echo is in a function, it's for a form submit actually) </p>
  
  <p>Here is an example on a partial of my code. In this situation, how can I put theses if statement inside my echo??</p>
  
  <pre><code>   &lt;?php echo '&lt;td&gt;&lt;select id="depuis" name="depuis"&gt;
      &lt;option value=\'4\' &lt;?php if(isset($_POST[\'depuis\']) &amp;&amp; $_POST[\'depuis\'] == \'4\'){ echo \'selected\'; } else { echo ''; } ?&gt; &gt;&lt;/option&gt;
      &lt;option value=\'1\' &lt;?php if(isset($_POST[\'depuis\']) &amp;&amp; $_POST[\'depuis\'] == \'1\'){ echo \'selected\'; } else { echo ''; } ?&gt; &gt;2 ans et moins&lt;/option&gt;
      &lt;option value=\'2\' &lt;?php if(isset($_POST[\'depuis\']) &amp;&amp; $_POST[\'depuis\'] == \'2\'){ echo \'selected\'; } else { echo ''; } ?&gt; &gt;2 &amp;agrave; 5 ans&lt;/option&gt;
      &lt;option value=\'3\' &lt;?php if(isset($_POST[\'depuis\']) &amp;&amp; $_POST[\'depuis\'] == \'3\'){ echo \'selected\'; } else { echo ''; } ?&gt; &gt;5 ans et plus&lt;/option&gt;
  &lt;/select&gt;
  &lt;/td&gt;'
  ; ?&gt;
  </code></pre>