title: Echo variables from a SELECT statement
body: <p>i'm trying to make a select query and output this information into a html tags, however it keep converting the php code to this:</p>
  
  <pre><code>&lt;!--? echo $news_text; ?--&gt;
  </code></pre>
  
  <p>What am i doing wrong? and why isnt it returning error instead of converting it to above?</p>
  
  <p>code</p>
  
  <pre><code>$con = mysqli_connect('localhost','root','pass','db');
  $theId = $_GET['id'];
  &lt;?
  
  $all_news = $con-&gt;prepare("SELECT 
  n.id, 
  n.title, 
  n.url, 
  n.image_url, 
  n.date, 
  n.news_text, 
  w.url as website_url, 
  w.image as website_image 
  from news n
  join website w on w.id = n.website_id
  where  n.id = ? limit 1"); 
  $all_news-&gt;bind_param("i", $theId);
  $all_news-&gt;execute();
  $all_news-&gt;bind_result($id, $title, $url, $image_url, $date, $news_text,     $url, $referer_img);
  $all_news-&gt;fetch();
  
    ?&gt;
  
  &lt;div class='main_image' style='background-image:url(&lt;?php echo $image_url; ?&gt;)' title=''&gt;&lt;/div&gt;
     &lt;p class="title"&gt;
      &lt;? echo $title; ?&gt;
    &lt;/p&gt;
     &lt;img class="referer" src="&lt;?php echo $referer_img ?&gt;" alt=""&gt;
     &lt;div class="text_div"&gt;
          &lt;p&gt;
            &lt;? echo $news_text; ?&gt;
          &lt;/p&gt;
     &lt;/div&gt;
  </code></pre>