|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
how to count an array?
my problem is: I have in my database 30 rows. what I want to do is make radiobuttons for every row, but AFTER THE 15th ROW I WANT TO WRITE THE OTHER 15 IN A NEW COLUMN. here is my code. right now it just lists the subjects and does not care how long the $row array is.
Code:
while($row = mysql_fetch_array($result))
{
echo "<tr><td><input type="checkbox" name="" . $row['nr'] . "" value="newsletter" border="0">"" . $row['subject'] . ""</td></tr>";
}
|
|
#2
|
|||||
|
|||||
|
RE: how to count an array?
php Code:
Cheers, Keith. |
|
#3
|
|||
|
|||
|
RE: how to count an array?
thanks, good to know there is help out there ...
|
|
#4
|
|||
|
|||
|
RE: how to count an array?
it basicly works. but because the for loop starts with $x=0, it writes in the second column the last subject of the first column again! but when I start with 1, the first subject is obviously lost. How can I solve this problem?
and at the end it writes two empty subjects which arent in the database. but look for yourself. here is the LINK. thanks again |
|
#5
|
|||||
|
|||||
|
RE: how to count an array?
php Code:
Cheers, Keith. |
|
#6
|
|||
|
|||
|
RE: how to count an array?
thx, worx now!
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > how to count an array? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|