Hello akul,

Wednesday, December 26, 2001, 5:50:29 PM, you wrote:

aoc> Hello Daniel,

aoc> Tuesday, December 25, 2001, 5:09:05 PM, you wrote:

DH>> Hello guys

DH>> I have following code, it splits 1 array into 2(to make 2 colomns
DH>> out of 1) and then displays it, but for some reason it only displayes
DH>> 1 array not second
aoc>   Because you didn't close TD

DH>> --------
DH>> $i=0;
$this->>>query( "select * from topics");
while($this->>>fetchRow()){
DH>>     $array[$i] = $this->record["name"];
DH>>     $i++;
DH>> }
     
DH>> $count = count($array);
DH>> $count = $count/2;
DH>> $count = round($count,0);

DH>> $x = 0;

DH>> echo "<table>\n";
DH>> foreach($array as $key => $value) {
DH>>     if ($x <=$count) {
DH>>         $array1[] = $value;
DH>>     } elseif($x > $count) {
DH>>         $array2[] = $array[$x];
DH>>     }
DH>>     echo "<tr><td>$array1[$x]</td><td>$array2[$x]</tr>\n";
aoc>                                                      ^ </TD>

aoc> Try this:
                                                     
aoc>         echo t('TR',t('TD',$array1[$x]).t('TD',$array2[$x]));


aoc> function tagname($tag)
aoc> {
aoc>      $tagname=explode(' ',$tag);
aoc>      return $tagname[0];
aoc> }

aoc> function t($tag,$text)
aoc> {
aoc>         return '<'.$tag.'>'.$text.'</'.tagname($tag).'>';
aoc> }




Thank You, but still no resut :-(

-- 
Best regards,
 Daniel                            mailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to