PHP and Windows INI files

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 [...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2005
mosscliff
 
Posts: n/a
Default PHP and Windows INI files

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
Reply With Quote
  #2 (permalink)  
Old 04-16-2005
Janwillem Borleffs
 
Posts: n/a
Default Re: PHP and Windows INI files

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



Reply With Quote
  #3 (permalink)  
Old 04-16-2005
mosscliff
 
Posts: n/a
Default Re: PHP and Windows INI files

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

Reply With Quote
  #4 (permalink)  
Old 04-16-2005
ZeldorBlat
 
Posts: n/a
Default Re: PHP and Windows INI files

See this article:

http://www.faqts.com/knowledge_base/...l/aid/1/fid/40

Reply With Quote
  #5 (permalink)  
Old 04-17-2005
R. Rajesh Jeba Anbiah
 
Posts: n/a
Default Re: PHP and Windows INI files

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/

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0