My Quastion Very Simple , How to Make My block Prints out the Records into Column instaed Row ..
this is my Block Code.
include_once XOOPS_ROOT_PATH."/include/xoopscodes.php";
function b_news_blocks_show($options) {
global $xoopsUser, $xoopsConfig, $xoopsDB;
$block = array();
$myts =& MyTextSanitizer::getInstance();
$sql=$xoopsDB->query("select count(id) from ".$xoopsDB->prefix("test")."");
list($numrows) = $xoopsDB->fetchRow($sql);
$result = $xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix("test")." order by id desc limit ".$options[1]."");
while($myrow = $xoopsDB->fetchArray($result)){
$mytest= array();
$mytest['name'] = $myts->htmlSpecialChars($myrow['name']);
$block['lang_xname'] = _MB_MYNAME;
$block['mytest'][] = $mytest;
}
return $block;
}
function b_news_blocks_edit($options) {
$form = "Noumber of Names ";
$form .= ";
$form .= "date'";
$form .= " />";
$form .= ".$options[1]."' /> #";
return $form;
}
this is my Template which prints the result in Row , I need it to print it out to 2 column .
<table cellpadding="5" cellspacing="5" class="outer">
<{foreach item=mytest from=$block.mytest}>
<tr>
<td class="even">
<div>
<{$mytest.name}>div>
td>
tr>
<tr>
<{/foreach}>
tr>
table>