Re: [PHP] $_POST into a formatted string, help!

2002-07-03 Thread 1LT John W. Holmes
- Original Message - From: "Erik Price" <[EMAIL PROTECTED]> > > foreach ($_POST as $key => $val) > > { > > $str .= "&$key=$val"; > > } Make sure you define $str = ""; before it enters the loop, othewise you'll throw some warnings if your error reporting level is set high. It's because

Re: [PHP] $_POST into a formatted string, help!

2002-07-03 Thread Erik Price
> Oh man I hope you don't shoot yourself when you realize how easy this > is.. > > foreach ($_POST as $key => $val) > { > $str .= "&$key=$val"; > } > > Then just crop the first char off and there you go. Even easier, though maybe requiring a tiny bit extra memory to deal with the array:

Re: [PHP] $_POST into a formatted string, help!

2002-07-03 Thread Scott Fletcher
; > foreach ($_POST as $key => $val) > { > $str .= "&$key=$val"; > } > > Then just crop the first char off and there you go. > > -Kevin > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Se

Re: [PHP] $_POST into a formatted string, help!

2002-07-02 Thread Analysis & Solutions
On Tue, Jul 02, 2002 at 04:19:50PM -0600, Kevin Stone wrote: > Oh man I hope you don't shoot yourself when you realize how easy this is.. > > foreach ($_POST as $key => $val) > { > $str .= "&$key=$val"; > } But, don't forget the post may contain spaces or other characters which will trip up

Re: [PHP] $_POST into a formatted string, help!

2002-07-02 Thread Kevin Stone
EMAIL PROTECTED]> Sent: Tuesday, July 02, 2002 4:10 PM Subject: [PHP] $_POST into a formatted string, help! > Hello, > > I need to get _$POST into a string in this form: > tree=green&sky=blue&sun=yellow , how can i accomplish this? > > THanks. > > > -- >

[PHP] $_POST into a formatted string, help!

2002-07-02 Thread php
Hello, I need to get _$POST into a string in this form: tree=green&sky=blue&sun=yellow , how can i accomplish this? THanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php