By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,397 Members | 1,393 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,397 IT Pros & Developers. It's quick & easy.

PHP and Windows INI files

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

Jul 17 '05 #2

P: n/a
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:<42**********************@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

Jul 17 '05 #3

P: n/a
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/

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.