Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15232
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: replacing import_request_variables with extract - not working ... |
| Date | 2015-04-11 16:11 +0200 |
| Organization | solani.org |
| Message-ID | <mgba1n$v0r$1@solani.org> (permalink) |
| References | <d047a1ae-3794-4015-ae00-2da2f62bab88@googlegroups.com> |
Richard Townsend-Rose wrote:
> being a bit thick here ...
>
> updating to php 5.5 after many years not using php ...
>
> used to use this.
> // get variables from form, etc
> // import_request_variables('p', 'F_'); // turn posted vars to F_var
>
> its now deprecated, so trying this:
> extract($_POST, EXTR_PREFIX_ALL, 'F_');
>
> but it is not creating F_ver for example
Read the description of the $prefix parameter[1] more carefully: it
automatically adds an undescore character. So with your current code
you have $F__ver (two underscores).
[1] <http://php.net/manual/en/function.extract.php>
--
Christoph M. Becker
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
replacing import_request_variables with extract - not working ... Richard Townsend-Rose <richard.townsendrose@gmail.com> - 2015-04-11 06:08 -0700
Re: replacing import_request_variables with extract - not working ... Jerry Stuckle <jstucklex@attglobal.net> - 2015-04-11 09:33 -0400
Re: replacing import_request_variables with extract - not working ... Richard Townsend-Rose <richard.townsendrose@gmail.com> - 2015-04-11 07:04 -0700
Re: replacing import_request_variables with extract - not working ... Jerry Stuckle <jstucklex@attglobal.net> - 2015-04-11 10:37 -0400
Re: replacing import_request_variables with extract - not working ... "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-04-11 16:11 +0200
Re: replacing import_request_variables with extract - not working ... Richard Townsend-Rose <richard.townsendrose@gmail.com> - 2015-04-11 09:05 -0700
Re: replacing import_request_variables with extract - not working ... Richard Yates <richard@yatesguitar.com> - 2015-04-11 09:24 -0700
Re: replacing import_request_variables with extract - not working ... "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-04-11 19:23 +0200
Re: replacing import_request_variables with extract - not working ... Jerry Stuckle <jstucklex@attglobal.net> - 2015-04-11 14:44 -0400
csiph-web