Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5871

Re: reading a newline from a properties file

From "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Newsgroups comp.lang.php
Subject Re: reading a newline from a properties file
Date 2012-05-09 10:37 +0200
Organization http://alvaro.es/
Message-ID <jodabf$9in$1@dont-email.me> (permalink)
References <20447277.1852.1336486906498.JavaMail.geo-discussion-forums@ynff7> <12113687.988.1336542193956.JavaMail.geo-discussion-forums@vbpz13> <jod9bh$51c$1@dont-email.me>

Show all headers | View raw


El 09/05/2012 10:20, "Álvaro G. Vicario" escribió/wrote:
> El 09/05/2012 7:43, taltene@gmail.com escribió/wrote:
>> בתאריך יום שלישי, 8 במאי 2012 17:21:46 UTC+3, מאת tal...@gmail.com:
>> This is the function I use to try and read the value:

BTW, if I had to read such file I'd do this:

function read_value_by_key ($prop_file, $prop_key){
	$props = parse_ini_file($prop_file, FALSE, INI_SCANNER_RAW);
	return array_key_exists($prop_key, $props) ? trim($props[$prop_key]) : 
FALSE;
}



-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

reading a newline from a properties file taltene@gmail.com - 2012-05-08 07:21 -0700
  Re: reading a newline from a properties file The Natural Philosopher <tnp@invalid.invalid> - 2012-05-08 15:42 +0100
  Re: reading a newline from a properties file "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-05-08 16:53 +0200
  Re: reading a newline from a properties file "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-08 18:52 +0200
  Re: reading a newline from a properties file Denis McMahon <denismfmcmahon@gmail.com> - 2012-05-08 17:33 +0000
  Re: reading a newline from a properties file taltene@gmail.com - 2012-05-08 22:43 -0700
    Re: reading a newline from a properties file "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-09 09:50 +0200
    Re: reading a newline from a properties file "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-05-09 10:20 +0200
      Re: reading a newline from a properties file "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-05-09 10:37 +0200
        Re: reading a newline from a properties file taltene@gmail.com - 2012-05-09 04:21 -0700
          Re: reading a newline from a properties file Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-09 10:33 -0400
            Re: reading a newline from a properties file taltene@gmail.com - 2012-05-09 22:56 -0700
              Re: reading a newline from a properties file Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-15 07:49 -0400
          Re: reading a newline from a properties file Captain Paralytic <paul_lautman@yahoo.com> - 2012-05-09 05:26 -0700
            Re: reading a newline from a properties file taltene@gmail.com - 2012-05-09 05:47 -0700

csiph-web