title: PHP Print / Echo Back Arrow Error
body: <p>Used PHP for a few years now and come across a strange error today. Using a MySQL to produce an XML feed. The following keeps happening in output </p>
  
  <pre><code>&lt;title&gt;title&lt;/title&gt;
  &lt;link&gt;link&lt;/link&gt;
  &lt;description&gt;descriptiondescription&gt;
  </code></pre>
  
  <p>When using print or echo the tag is missed on some of the feed ouput, here is the code.</p>
  
  <pre><code>    print "&lt;description&gt;";
  
      $desc = strip_tags($rowx['meta_description']);
  
      $desc = htmlspecialchars($desc);
  
      $desc = urlencode($desc);
  
      $desc = str_replace('%95', '', $desc);
      $desc = str_replace('%92', '', $desc);
      $desc = str_replace('%A3', '', $desc);
  
      $desc = urldecode($desc);
  
      print preg_replace( "/\r|\n/", "", $desc );
  
      print "&lt;/description&gt;";
      print "\n";
  </code></pre>
  
  <p>Another example of the output </p>
  
  <pre><code>&lt;g:condition&gt;new&lt;/g:condition&gt;
  &lt;g:brand&gt;SALTO&lt;/g:brand&gt;
  &lt;g:color&gt;&lt;/g:color&gt;
  g:size&gt;&lt;/g:size&gt;
  &lt;g:payment_accepted&gt;Visa&lt;/g:payment_accepted&gt;
  </code></pre>
  
  <p>Code which is outputting above</p>
  
  <pre><code>print "&lt;g:condition&gt;new&lt;/g:condition&gt;";
          // print "\n";
          // brand 
          print "&lt;g:brand&gt;";
          $result_brand = mysql_query("SELECT value FROM cscart_product_features_values WHERE feature_id = '80' AND product_id = '$product_id'");
          $row_brand = mysql_fetch_row($result_brand);
          print $row_brand[0];
          print "&lt;/g:brand&gt;";
          // print "\n";
          // color
          print "&lt;g:color&gt;";
          $result_color = mysql_query("SELECT cscart_product_feature_variant_descriptions.variant FROM cscart_product_feature_variant_descriptions, cscart_product_features_values WHERE cscart_product_feature_variant_descriptions.variant_id = cscart_product_features_values.variant_id AND cscart_product_features_values.feature_id = '19' AND product_id = '$product_id'");
  
          $row_color = mysql_fetch_row($result_color);
          print $row_color[0];
  
          print "&lt;/g:color&gt;";
          // print "\n";
          // size
          print "&lt;g:size&gt;";
          $result_size = mysql_query("SELECT cscart_product_feature_variant_descriptions.variant FROM cscart_product_feature_variant_descriptions, cscart_product_features_values WHERE cscart_product_feature_variant_descriptions.variant_id = cscart_product_features_values.variant_id AND cscart_product_features_values.feature_id = '25' AND product_id = '$product_id'");
  
          $row_size = mysql_fetch_row($result_size);
          print $row_size[0];
          print "&lt;/g:size&gt;";
          // print "\n";
  
          print "&lt;g:payment_accepted&gt;Visa&lt;/g:payment_accepted&gt;";
  </code></pre>