p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: What´s the new syntax I must use to access arrays?


Message #1 by cyberjoe@t... on Mon, 13 May 2002 01:45:37
I´ve been told that register_globals is (or will be) deprecated in the 
newer versions of php as of php4.1.plus and that instead of using 
$variable, you now have to use $_REQUEST["variable"], or $_GET
["variable"], or $_POST["variable"], depending on the method 
used.Unfortunately, while working through the listbox example in Chapter 
3,in which you´re dealing with an Array, namely $EngineSize
[0]...$EngineSize[3],I found out that this newer syntax doesn´t work (ít 
hasn´t worked for me).Does anyone have a clue how I could go about it?

Thanks in advance,

Joe
Message #2 by "Ch'anyom" <chanyom@n...> on Sun, 12 May 2002 20:44:18 -0400
This is a multi-part message in MIME format.

------=_NextPart_000_001F_01C1F9F5.C9491C00
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

would $_GET["EngineSize"][0]...$_GET["EngineSize"][3] not work?


----- Original Message -----
From: cyberjoe@t...
To: beginning php
Sent: Monday, May 13, 2002 1:45 AM
Subject: [beginning_php] What=B4s the new syntax I must use to access 
arrays?


I=B4ve been told that register_globals is (or will be) deprecated in the 

newer versions of php as of php4.1.plus and that instead of using
$variable, you now have to use $_REQUEST["variable"], or $_GET
["variable"], or $_POST["variable"], depending on the method
used.Unfortunately, while working through the listbox example in Chapter 

3,in which you=B4re dealing with an Array, namely $EngineSize
[0]...$EngineSize[3],I found out that this newer syntax doesn=B4t work 
(=EDt
hasn=B4t worked for me).Does anyone have a clue how I could go about it?

Thanks in advance,

Joe



Message #3 by cyberjoe@t... on Mon, 13 May 2002 02:02:22
> This is a multi-part message in MIME format.

------=_NextPart_000_001F_01C1F9F5.C9491C00
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

would $_GET["EngineSize"][0]...$_GET["EngineSize"][3] not work?


----- Original Message -----
From: cyberjoe@t...
To: beginning php
Sent: Monday, May 13, 2002 1:45 AM
Subject: [beginning_php] What=B4s the new syntax I must use to access 
arrays?


I=B4ve been told that register_globals is (or will be) deprecated in the 

newer versions of php as of php4.1.plus and that instead of using
$variable, you now have to use $_REQUEST["variable"], or $_GET
["variable"], or $_POST["variable"], depending on the method
used.Unfortunately, while working through the listbox example in Chapter 

3,in which you=B4re dealing with an Array, namely $EngineSize
[0]...$EngineSize[3],I found out that this newer syntax doesn=B4t work 
(=EDt
hasn=B4t worked for me).Does anyone have a clue how I could go about it?

Thanks in advance,

Joe




DEAR FRIEND,

THANKS A LOT.IT WORKS BEAUTIFULLY.

JOE

  Return to Index