You are here: Re: break apart a variable « PHP Programming Language « IT news, forums, messages
Re: break apart a variable

Posted by Auddog on 02/08/07 03:13

I went back and did as you told me. I was assuming the second option was
what was happening after you hit the submit button. I apologize for not
following the instructions,. I guess I'm biting off more than I know with
this script.

I was able to change my page and I did start getting the results: Array (
[1] => 8 [2] => [3] => [4] => [5] => 8 ETC. I'm still curious as to how the
=> got into the mix, but I'll do some reading to figure that out. Now that
I'm getting the something, maybe I'll be able to get it into my database.
Thanks again for all your time and help.

A


"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:op.tneon22kqnv3q9@misant.kabel.utwente.nl...
Curtis <zer0dyer@verizon.net> wrote:
> Let's see what you get, alter Rik's code and post the output back to
> us (if it repeats a lot, just post enough to get a look at what the
> keys look like):
>
> $hours = array();
>
> echo '<pre>';
> print_r($_POST); // dump all submitted POST data
> echo '</pre><br>';
>
> foreach($_POST as $key => $value){
> if(preg_match('/^[0-9]+-hours$/i',$key)){

The would only be usefull if the postfields were still in the 'id-hours'
format. It's now in 'hours[id]'.

So just print_r($_POST['hours']);
--
Rik Wasmus

 

Navigation:

[Reply to this 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

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