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>";
Question
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?
La solution
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>";