Проблем с substr добавя някав знак

sorRy

Registered
Код:
<?php
      include("config.php");
      

      $sql = ("SELECT * FROM publikacii ORDER BY id DESC LIMIT 5");
      $result = mysql_query($sql);
      
      while($row = mysql_fetch_array($result)){
      if(strlen($row['zaglavie']) > 53) {
      $zaglavie =  substr($row['zaglavie'], 0, 53);
      }
      else {
      $zaglavie = $row['zaglavie'];
      }
      echo '
	  <p>
  <a id="na" href="read.php?id='.$row[id].'">'.$zaglavie.'...</a><p>';
      
      }

      ?>
� ето това значе добавя преди ...
 
Код:
<?php
      include("config.php");
      

      $sql = ("SELECT * FROM publikacii ORDER BY id DESC LIMIT 5");
      $result = mysql_query($sql);
      
      while($row = mysql_fetch_array($result)){
      if(strlen($row['zaglavie']) > 53) {
      $zaglavie =  substr("$row['zaglavie']", 0, 53);
      }
      else {
      $zaglavie = $row['zaglavie'];
      }
      echo '
	  <p>
  <a id="na" href="read.php?id='.$row[id].'">'.$zaglavie.'...</a><p>';
      
      }

      ?>
 
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/a4089761/public_html/4.php on line 10
 
Код:
<?php
      include("config.php");
     

      $sql = ("SELECT * FROM publikacii ORDER BY id DESC LIMIT 5");
      $result = mysql_query($sql);
     
      while($row = mysql_fetch_array($result)){
      if(strlen($row['zaglavie'])) > 53) {
      $zaglavie =  substr("$row['zaglavie']", 0, 53);
      }
      else {
      $zaglavie = $row['zaglavie'];
      }
      echo '
     <p>
  <a id="na" href="read.php?id='.$row[id].'">'.$zaglavie.'...</a><p>';
     
      }

      ?>

Така? :idea:
 

Горе