This is a discussion on PHP and Windows INI files within the PHP Language forums, part of the PHP Programming Forums category; Are there any PHP scripts for handling windows style INI files ie [section] one = great two=not very good etc [...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Are there any PHP scripts for handling windows style INI files
ie [section] one = great two=not very good etc [next section] Also how do you handle multi-selects from an input field on a form The brain is getting too old to work it out myself !!! Thanks Tim |
|
|||
|
mosscliff wrote:
> Are there any PHP scripts for handling windows style INI files > http://www.php.net/manual/en/functio...e-ini-file.php > Also how do you handle multi-selects from an input field on a form > <select name="multiple_select" multiple="multiple"> <option value="value">label</option> <option value="value2">label2</option> <option value="value3">label3</option> </select> foreach ($_POST['multiple_select'] as $key => $value) { ... } JW |
|
|||
|
Many thanks, now I have no excuses, for not finishing, this weekend.
I am a bit in the dark with regard to the key => value construct, but I will give your solution a try and see what prints. As an aside, Is it best to use print or echo with PHP. If only because it is one less character to parse, I wondered about using echo always. I know about the short version, but would prefer to use the full word for better documentation. Thanks Again tim "Janwillem Borleffs" <jw@jwscripts.com> wrote in message news:<4260e48f$0$3012$dbd4d001@news.euronet.nl>... > mosscliff wrote: > > Are there any PHP scripts for handling windows style INI files > > > > http://www.php.net/manual/en/functio...e-ini-file.php > > > Also how do you handle multi-selects from an input field on a form > > > > <select name="multiple_select" multiple="multiple"> > <option value="value">label</option> > <option value="value2">label2</option> > <option value="value3">label3</option> > </select> > > foreach ($_POST['multiple_select'] as $key => $value) { > ... > } > > > JW |
|
|||
|
|
|
|||
|
Janwillem Borleffs wrote:
> mosscliff wrote: <snip> > > Also how do you handle multi-selects from an input field on a form > > > > <select name="multiple_select" multiple="multiple"> ^^^^^^ Should be <select name="multiple_select[]" multiple="multiple"> http://in.php.net/faq.html#faq.html.select-multiple -- <?php echo 'Just another PHP saint'; ?> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ |