Hello,
please note that this is not a support forum for PHP. Please ask on the
php-general@lists.php.net mailinglist. However you can do this:
for ($i=1; $i<10; ++$i) {
echo ${"id_".$i};
}
Derick
On Wed, 7 Nov 2001, JIM wrote:
> hi all,
> i am in situation that i got 300 set of data in a form, each set of data
> contain id, name, room_num.
> now, i want to use these data in a php page after i post them out. for
> example, i want to display these data in next page. what can i do?
>
> in last page, i got
> id_1, name_1, room_num_1
> id_2, name_2, room_num_2
> id_3, name_3, room_num_3
> id_4, name_4, room_num_4
> ...
>
> in my display.php
> <?
> for (i=0;i<10;i++)
> {
> echo ("$id_$i, $name_$i, $room_num_$i");
> // i want to echo
> // id_1, name_1, room_num_1
> // id_2, name_2, room_num_2
> // id_3, name_3, room_num_3
> // id_4, name_4, room_num_4
> // this does not work, but how cna i work out?
>
> }
> ?>
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - derick@php.net
SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------