title: SetTimeout function with variable time
body: <p>I'm trying to create a countdown using time values taken from a POST value. Problem is that I cannot make it work, not sure if this is even doable. Here is my code:</p>
  
  <pre><code>&lt;script type = 'text/javascript'&gt;
  
  var tiempo =  &lt;?php 
      $result = fopen("file.txt", "r");
      $RES = fread($result,"3");
      ?&gt;;
  
  
  function show() {
      document.getElementById("img").style.display = "block";
      setTimeout("hide()", tiempo);
  }
  
  function hide() {
      document.getElementById("img").style.display = "none";
  }
  
  
     &lt;/script&gt; 
  </code></pre>