我怎么能做水平表?

时间:2013-11-09 09:12:08

标签: php

在lib中编写PHP代码:

$spellquery = doquery("SELECT id,name,type FROM {{table}}","habilidades");
        $userspells = explode(",",$userrow["spells"]);
        $userrow["magiclist"] = "";
        while ($spellrow = mysql_fetch_array($spellquery)) {
            $spell = false;
            foreach($userspells as $a => $b) {
                if ($b == $spellrow["id"]) { $spell = true; }
            }
            if ($spell == true) {
                $userrow["magiclist"] .= "<a href=\"index.php?do=habilidad:".$spellrow["id"]."\"><img border=0 src=\"estilo/imagenes/skills/".$spellrow["name"].".png\" ></a><br />";
            }
        }
        if ($userrow["magiclist"] == "") { $userrow["magiclist"] = "none"; }

模板页面中的代码:

 <div>

    {{magiclist}}

    </div>

在页面中显示:http://lordehsa.5gbfree.com/estilo/imagenes/skills/out.JPG

我想要这样做:http://lordehsa.5gbfree.com/estilo/imagenes/skills/out2.jpg

1 个答案:

答案 0 :(得分:0)

只需删除<br />即可在一行中显示图片!