I can not understand why the substr is not working. Here is the code:
<?php
// conexão com bd
$host = "localhost";
$user = "root";
$pass = "";
$db = "loja";
$conexao = mysqli_connect($host, $user, $pass, $db);
$consulta = "Select concact(substr(nome,1,10),'...') as nome from produtos";
$resultado = mysqli_query($conexao, $consulta);
while($linha = mysqli_fetch_array($resultado)){
?>
<p> <?php echo $linha['nome']; ?> </p>
<?php
}
?>