----- Original Message -----
From: "Alex Hogan" <[EMAIL PROTECTED]>
To: "PHP General list" <[EMAIL PROTECTED]>
Sent: Friday, January 16, 2004 4:20 PM
Subject: [PHP] Can I do this? If so why wont it work
> I am wanting to read in several session values at once.
>
>
>
> This is what I have so far;
>
>
>
> $_SESSION['obj[1]'] = $_REQUEST['txtObj1'];
>
> $_SESSION['obj[2]'] = $_REQUEST['txtObj2'];
>
> $_SESSION['obj[3]'] = $_REQUEST['txtObj3'];
>
> $_SESSION['obj[4]'] = $_REQUEST['txtObj4'];
>
> $_SESSION['obj[5]'] = $_REQUEST['txtObj5'];
>
>
>
> $i = 1;
>
> while ($i <= 5) {
>
> $obj_ar[$i] = $_SESSION['obj[$i]']$i++;
>
> }
>
>
>
> I keep getting this error;
>
> Parse error: parse error, unexpected T_VARIABLE in mypage.php on line 24
>
>
>
> Where am I making the mistake?
>
>
>
> alex hogan
>
>
>
>
>
> ******************************************************************
> The contents of this e-mail and any files transmitted with it are
> confidential and intended solely for the use of the individual or
> entity to whom it is addressed. The views stated herein do not
> necessarily represent the view of the company. If you are not the
> intended recipient of this e-mail you may not copy, forward,
> disclose, or otherwise use it or any part of it in any form
> whatsoever. If you have received this e-mail in error please
> e-mail the sender.
> ******************************************************************
>
>
>
What is on line 24?
Try this:
while ($i <= 5) {
$obj_ar[$i] = $_SESSION['obj[$i]'];
$i++;
}
Jake
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php