Reply to Re: Newbie Help. PHP4 to PHP5: problem listing $_GET values.

Your name:

Reply:


Posted by chris_fieldhouse@hotmail.com on 01/08/07 19:21

Floortje wrote:
> chris_fieldhouse@hotmail.com schreef:
> > Hi,
> >
> > Hope Someone can help.
> > I am migrating a web page originally written for PHP4 to PHP5,
> > everything is going well, except for one problem which has me stumped!
> >
> >
> > Part of my PHP script lists all the values passed to it in the URL and
> > read using the $_GET.
> >
> >
> > breaking it down into a simple function to demonstrate the problem.
> >
> >
> > if(sizeof($_GET)) {
> > while(list($key, $val) = each($HTTP_GET_VARS)) {
> > echo $key . " : " . $val" . "<br>";
> > }
> Use $_GET. dont use $HTTP_GET_VARS iirc it's not used anymore (by default)
>
> foreach ($_GET as $key=>$val)
> {
> echo "$key : $val <br />\n";
> }
>
>
> --
> Arjen
> http://www.hondenpage.com

Thank you.

the code I was using was based on online samples, which often mix $_GET
and $HTTP_GET_VARS.
Your solution is far cleaner.

Thanks again.

Chris.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация