I tried to allow the last td in this code to be next to the previous td , but I canβt, and td is printed on a new line. How to allow them to be next to each other, the problem is that the first 5 td are in the foreach loop, and the last td does not follow this foreach, because this value is a function, not a key or value in foreach.
<?php foreach($downloads as $dl) { ?> <tr id="this"> <td ><img src="images/<?=$dl['type']?>.png"/></td> <td id="no3"><?=$dl['type']?></td> <td> <a target="_blank" style="margin-right:3px" href="download.php?id=<?=$dl['id']?>"> <?=$dl['title']?> </a> </td> <td> <center> <a href="http://<?=urlencode($dl['surl'])?>"><?=$dl['sname']?></a> </center> </td> <td align="center"><?=$dl['views']?></td> </tr> <?php } ?> <td align="center"><?=$core->use_love(); ?></td>


Last td function
public function use_love(){ $sql=mysql_query("select * from wcddl_downloads ORDER BY id DESC LIMIT ".$this->pg.",".$this->limit.""); while($row=mysql_fetch_array($sql)) { $down_id=$row['id']; $love=$row['love']; ?> <div class="box" align="center"> <a href="#" class="love" id="<?php echo $down_id; ?>"> <span class="on_img" align="left"> <?php echo $love; ?> </span> </a> </div> <? } }
source share