title: ajax code with echo <script> not work
body: <p>I have this ajax code:</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function() {
          $('ul#tab li:first').html('&lt;?php echo $channel;?&gt;');
          $('ul#tabs li').on("click", function() {
              //        $('ul#tab li.active').html($(this).html());
              $('ul#tab li').html("");
              //$('ul#tab li.active').html($(this).html());
              var index = $("ul#tabs li").index($(this));
              $.post("../admin/ajax/ch1.php", {
                  index: index
              }, function(result) {
                  $('ul#tab li.active').html(result);
              });
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>and in the php ch1.php is</strong></p>
  
  <pre><code>&lt;?php
  $ch1tab1= file_get_contents("../channels/ch1tab1.html");
  $ch1tab2= file_get_contents("../channels/ch1tab2.html");
  $ch1tab3= file_get_contents("../channels/ch1tab3.html");
  $ch1tab4= file_get_contents("../channels/ch1tab4.html");
  $ch1tab5= file_get_contents("../channels/ch1tab5.html");
  $channel = $_POST['index'];
  if ($_POST['index'] == 0 ){ $channel = $ch1tab1;}
  else if ($_POST['index'] == 1){ $channel = $ch1tab2;}
  else if ($_POST['index'] == 2 ){ $channel= $ch1tab3;}
  else if ($_POST['index'] == 3 ) {$channel = $ch1tab4;}
  else if ($_POST['index'] == 4 ) {$channel = $ch1tab5;}
  echo $channel; ?&gt;
  </code></pre>
  
  <p>the varible ch1tab4 have a  code , and it is not work , echo blank
  what i should to do plz ?</p>