Re: splitting list into columns [message #183536 is a reply to message #183405] |
Wed, 30 October 2013 05:38 |
Biju S
Messages: 3 Registered: December 2012
Karma:
|
Junior Member |
|
|
On Wednesday, October 23, 2013 3:49:27 AM UTC+5:30, richard wrote:
> I want to display the 200 item list into 5 columns.
>
> What I have now works, except that the 2 to 5th columns are not adding
>
> properly.
>
> What do I need to change to make it work right?
>
>
>
> http://mroldies.net/200/jukebox.php
>
>
>
>
>
> <?php
>
>
>
> include "arrayxx.php";
>
>
>
> $min=1;
>
> $max=40;
>
>
>
> $bnumber=1;
>
>
>
> while ($bnumber<=5) {
>
>
>
> echo "<td>";
>
>
>
> echo $min;
>
> echo $max;
>
>
>
> while ($min<=$max){
>
>
>
> echo $playme[$min][2]."<br>";
>
>
>
> $min++;
>
>
>
> }
>
>
>
> echo "</td>";
>
>
>
> $min=$min+40;
>
> $max=$max+40;
>
> $bnumber++;
>
>
>
> }
>
>
>
> ?>
TRY this
<table border="1" >
<tr><td>
<?php for ($i=1; $i<=200; $i++) {
if($i %40==0) { echo $i . "<br/>"; ?>
</td> <td>
<?php } else { echo "" . $i . "<br/>"; } } ?>
</td></tr> </table>
|
|
|