The quotation marks must escape.
Even, it’s almost right in the original code, but there’s a double quotation mark left and there’s no escape in the first double quotation mark.
To correct can do only this:
echo "<a href=\"" . $pasta . $resultado["nomearq"] . " class=\"buttonlink\">".$resultado["dataup"]." / " . $resultado["nomearq"] . "</a><br />";
Or, better organize your code and leave so:
$link = $pasta . $resultado["nomearq"];
$descr = $resultado["dataup"]." / " . $resultado["nomearq"];
echo "<a href='{$link}' class='buttonLink'>{$descr}</a><br>";
It’s also possible to make a maneuver using single and double quotes, but I’m not even going to leave an example of this because it turns into horrible code.
It’s because the
$– Jéf Bueno
Ah, wait. You want "buttonlink" to be literal?
– Jéf Bueno
@LINQ As so literal?
– Arthur Oliveira
Literal, man. Literal.
– Jéf Bueno
@LINQ I want to change the color and font size that comes out when loading the page, understand? Applying the class
buttonlink– Arthur Oliveira
Arthur, I noticed that you tried to mark several answers as correct. This can only be done in one reply, ok?
– Jéf Bueno
@LINQ I thought I could, but I marked yours for being the first to answer!
– Arthur Oliveira
Just for the record, the downvote is not mine, even so I voted to close because this is the basics of PHP and has been debated here, I think the best question to understand this is this https://answall.com/q/4652/3635 that speaks of the characteristic of language. Observing: the answers are all correct, but I want to make it clear although there are no significant differences in the use of simple quotes in HTML, the question is more that you may get confused if mix different use, but it’s just a hint, nothing serious.
– Guilherme Nascimento