Error in the formation of the website title

Asked

Viewed 26 times

0

I’m having a problem on a client’s website, it has several product pages and I created a page called mostra_produto.php, but the function that calls the title is returning with problem.

ERROR:

inserir a descrição da imagem aqui

CODE:

<title>
     <?php echo($nomeproduto)?> .' - Vendas'); ?>
</title>
  • 1

    An equivalent but more compact form would be <?= "{$nomeproduto} - Vendas" ?>

2 answers

1


Try this way:

<title>
     <?php echo $nomeproduto.' - Vendas'; ?>
</title>

1

You’re doing the concatenation wrong, that close tag php should appear later at the end of the concatenation:

<?php echo $nomeproduto.' - Vendas'; ?>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.