Pergunta

I have a div layer with a voting script, how can I print it out in a row echo?

SELECT `image`,`Name`,`item`, (`totalrate` / `nrrates`) AS `rank` FROM `rtgitems` WHERE item
REGEXP 'Total'
 ORDER BY (`totalrate` / `nrrates`) 


echo "<td align='center' width='200'>" . $row['Name'] . "</td>";  
echo "<td align='center' width='200'>" . "<img src=\"{$row['image']}\">" . "</td>"; 
echo "<td align='center' width='200'>" . $row['rank'] . "</td>";  
echo "<td align='center' width='200'>" . <div class="srtgs" id="$row['item']"></div> . "</td>";

The variable srtgs is called in the <script src="../ratingfiles/ratings.js" type="text/javascript"></script> in the head

What am I missing?

Foi útil?

Solução

Your div needs to be echoed as a literal, just like the tds.

echo "<td align='center' width='200'><div class='srtgs' id=" . $row['item'] . "></div</td>";
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top