Use an array
<input type="hidden" name="itemid[]" value="1">1</input>
<input type="hidden" name="itemid[]" value="2">2</input>
<input type="hidden" name="itemid[]" value="3">3</input>

$numberofitemids=count($itemid);
echo $itemid[0]; // == 1
echo $itemid[1]; // == 2
echo $itemid[2]; // == 3


cheers
-----Original Message-----
From: Alia Mikati [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 17, 2002 2:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Forms in PHP

Hello
I hope u can help me with this problem. I dont know if it is possible to

do it. I'm using PHP and XML to generate the folowing HTML:
...
<form method="post" action="cart.php">
<input type="hidden" name="itemid" value="1">1</input>
...
<input type="hidden" name="itemid" value="2">2</input>
...
<input type="hidden" name="itemid" value="3">3</input>
...
...

I want to use PHP to count the number of $itemid in this file. Is it 
possible? And how?
Thx a lot



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to