-2
<p><b>Alvará: </b></p>
<p>Numero: Validade: Anexo:</p>';
Echo' <p>'.$exibe["AlvaraNumero"].'
'
if ($exibe['AlvaraValidade']) {
if (strtotime($exibe['AlvaraValidade']) < time())
{
echo '<span style="color:red">'.$exibe['AlvaraValidade'].'</span>';
} else {
echo $exibe['AlvaraValidade'];
}
} else {
echo 'N/D';
}
' '
echo '<a href="MostrarAlvara.php?id=' . $exibe['id'] . '">Ver PDF </a></p>
I am experiencing an error Parse error: syntax error, Unexpected 'if' (T_IF), expecting ',' or ';' in In this piece of code:
Echo' <p>'.$exibe["AlvaraNumero"].'
'
if ($exibe['AlvaraValidade']) {
Your code is weird. Using whitespace that way is usually a sign of something being done the wrong way. Anyway, before your first
if
, missing point and comma;
.– Sergio
I’m doing this because I can’t put tables inside tab’s so I’m trying out the white space
– ChrisAdler
This question seems to be discounted because it is about a typographical error of little or no value to future visitors.
– brasofilo
@Brasofilo I understand your comment about this post, and I know that to maintain quality, this kind of thing should not occur. But there are people who are really starting now! Instead of just closing the question and leaving the guy without the "answer" of anything, help him as I did just below. Really his question can not help anyone, but an answer where you will "fix" his code, I think is always welcome and always well seen by beginners in programming...
– Douglas Bernardino
@Douglasbernardino, the site is for professional programmers and enthusiasts. And no, there’s no problem helping beginners with elementary mistakes. But it is also good to signal to future visitors (target audience of the site) that this type of question does not belong to the scope of the site. If the question is closed and you still want to help, just post a comment summarizing the solution. . . . . . Anyway, if you want to extend the debate, open a question in [meta] ;)
– brasofilo
@Brasofilo no, it’s all understood :D
– Douglas Bernardino