title: How do I "echo" a function results into another function?
body: <p>I have this function :</p>
  
  <pre><code>function MakeInput($id, $class) {
      $value = substr($id, 2);
      global $$value;
      echo '&lt;input type="text" id="'.$id.'" name="'.$id.'" class="'.$class.'" value="'.htmlentities($$value,ENT_COMPAT,'UTF-8').'" /&gt;';
  }
  </code></pre>
  
  <p>Which do not return but echoes the results.</p>
  
  <p>I'd like to use it as it is into another function: </p>
  
  <pre><code>function ItkMakeMo($NomDebVar) {
  $Output = '
      &lt;tr&gt;    
          &lt;td&gt;Test&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;'.MakeInput($NomDebVar.'moshj','IntInput').'&lt;/td&gt;
      &lt;/tr&gt;
  ';
  echo $Output;
  </code></pre>
  
  <p>}</p>
  
  <p>So this solution doesn't work, PHP sends the MakeInput output before the "echo $Output"</p>