title: using a string in javascript from a template.html
body: <p>I was wondering how I can assign a string from template.html to a javascript variable. I'm using a php code that transforms rss to html. It replaces strings in a template.html in order to display information. I want to assign these replaced strings in javascirpt. Here my codes:</p>
  
  <p>My template.html</p>
  
  <pre><code> &lt;TABLE width="100%"&gt;
          ~~~BeginItemsRecord~~~
          &lt;TR&gt;
              &lt;TD&gt;
                   ~~~ItemPubShortTime~~~
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  &lt;B&gt;~~~ItemTitle~~~&lt;/B&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  &lt;BR&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          ~~~EndItemsRecord~~~
      &lt;/TABLE&gt;
  </code></pre>
  
  <p>When I run my program, for example instead of ~~~ItemPubShortTime~~~ you see time like 10.16AM. I want to assign 10.16 AM to a javascript variable in this file. </p>
  
  <p>My script looks like this:</p>
  
  <pre><code>&lt;script language="javascript"&gt;
  var sglm=new Array();
  sglm[0]= 'Hello World';
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to put 10.16AM instead of 'Hello World'. I hope it is clear. Thank you. </p>