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


Groups > comp.lang.php > #16110 > unrolled thread

parsing print_r() output with preg_match_all()

Started by"R.Wieser" <address@not.available>
First post2016-01-06 17:18 +0100
Last post2016-01-12 16:11 +0100
Articles 20 on this page of 114 — 10 participants

Back to article view | Back to comp.lang.php


Contents

  parsing print_r() output with preg_match_all()  "R.Wieser" <address@not.available> - 2016-01-06 17:18 +0100
    Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-06 19:28 +0000
      Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-06 20:50 +0100
        Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-06 21:12 +0000
          Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-06 16:20 -0500
            Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 02:23 +0000
              Re: parsing print_r() output with preg_match_all() Matthew Carter <m@ahungry.com> - 2016-01-06 21:48 -0500
                Re: parsing print_r() output with preg_match_all() Matthew Carter <m@ahungry.com> - 2016-01-06 21:52 -0500
                  Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 10:20 +0100
                  Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 10:56 +0000
                    Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 12:55 +0100
                      Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-07 08:36 -0500
                      Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 13:58 +0000
                        Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 15:33 +0100
                          Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 15:31 +0000
                          Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 18:23 +0100
              Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-06 22:50 -0500
              Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 10:10 +0100
            Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 10:03 +0100
              Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-07 08:38 -0500
                Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 14:05 +0000
                  Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-07 13:42 -0500
                    Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 20:24 +0000
                      Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-07 15:27 -0500
          Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 09:51 +0100
            Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 11:18 +0000
              Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 14:00 +0100
                Re: parsing print_r() output with preg_match_all() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-07 14:00 +0000
                Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 16:19 +0100
        Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-11 09:11 +0100
          Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 08:04 -0500
            Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-11 23:48 +0100
              Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-12 00:41 +0100
                Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 20:53 -0500
                  Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-12 05:40 +0100
                    Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-12 09:12 -0500
                      Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-12 21:43 +0100
                        Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-12 16:12 -0500
                          Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-12 22:28 +0100
                            Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-12 16:35 -0500
                              Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-13 06:39 +0100
                                Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-13 08:26 +0100
                                Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 08:10 -0500
                                  Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-13 14:49 +0100
                                    Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 10:08 -0500
                                      Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-13 18:50 +0100
                                        Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 15:06 -0500
                                          Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-13 23:11 +0100
                                            Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 17:18 -0500
                                              Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-13 23:27 +0100
                                                Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 19:17 -0500
                                                  Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 01:30 +0100
                                                    Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 20:52 -0500
                                                      Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 08:13 +0100
                                                        Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-14 09:18 -0500
                                                          Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 20:07 +0100
                                                            Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-14 16:06 -0500
                                                              Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 22:41 +0100
                                                    Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-14 22:35 +0100
                                  Re: parsing print_r() output with preg_match_all() Ian Collins <ian-news@hotmail.com> - 2016-01-14 10:24 +1300
                                    Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 17:20 -0500
                                      Re: parsing print_r() output with preg_match_all() Ian Collins <ian-news@hotmail.com> - 2016-01-14 12:14 +1300
                                        Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-13 19:18 -0500
                                          Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 08:34 +0100
                                            Re: parsing print_r() output with preg_match_all() Anders Wegge Keller <wegge@geostat.dk> - 2016-01-14 09:20 +0100
                                              Re: parsing print_r() output with preg_match_all() Ian Collins <ian-news@hotmail.com> - 2016-01-14 21:56 +1300
                                            Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-14 16:08 -0500
                                              Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 22:55 +0100
                                                Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-14 16:59 -0500
                                                  Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 23:09 +0100
                                                    Re: parsing print_r() output with preg_match_all() Ian Collins <ian-news@hotmail.com> - 2016-01-15 11:17 +1300
                                                      Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-14 19:15 -0500
                                                    Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-14 19:14 -0500
              Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 20:50 -0500
                Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-12 05:42 +0100
                  Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-12 08:41 +0100
                  Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-12 09:13 -0500
                    Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-12 21:44 +0100
                      Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-12 16:13 -0500
                        Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-12 22:29 +0100
                          Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-12 16:33 -0500
          Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-12 00:49 +0100
            Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 20:54 -0500
    Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 11:17 +0100
      Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 13:49 +0100
        Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 14:20 +0100
          Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 15:31 +0100
            Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 16:00 +0100
            Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-07 13:45 -0500
              Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-07 20:18 +0100
                Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-07 20:52 +0100
                  Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-07 15:29 -0500
              Re: parsing print_r() output with preg_match_all() Tim Streater <timstreater@greenbee.net> - 2016-01-07 22:42 +0000
                Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-08 10:43 +0100
    Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-11 09:07 +0100
      Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 08:05 -0500
        Re: parsing print_r() output with preg_match_all() Arno Welzel <usenet@arnowelzel.de> - 2016-01-11 23:51 +0100
          Re: parsing print_r() output with preg_match_all() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-01-12 00:31 +0100
          Re: parsing print_r() output with preg_match_all() Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 20:55 -0500
          Re: parsing print_r() output with preg_match_all() "R.Wieser" <address@not.available> - 2016-01-12 11:11 +0100
            Re: parsing print_r() output with preg_match_all() - question remains unanswered ... "R.Wieser" <address@not.available> - 2016-01-12 11:54 +0100
              Re: parsing print_r() output with preg_match_all() - question remains unanswered ... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-12 11:25 +0000
                Re: parsing print_r() output with preg_match_all() - question remains unanswered ... "R.Wieser" <address@not.available> - 2016-01-12 13:41 +0100
                  Re: parsing print_r() output with preg_match_all() - question remains unanswered ... "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-12 14:11 +0100
                    Re: parsing print_r() output with preg_match_all() - question remainsunanswered ... "R.Wieser" <address@not.available> - 2016-01-12 14:34 +0100
                      Re: parsing print_r() output with preg_match_all() - question remainsunanswered ... "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-12 15:03 +0100
                        Re: parsing print_r() output with preg_match_all() - questionremainsunanswered ... "R.Wieser" <address@not.available> - 2016-01-12 15:50 +0100
                          Re: parsing print_r() output with preg_match_all() - questionremainsunanswered ... "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-12 16:36 +0100
                            Re: parsing print_r() output with preg_match_all() - Solved. "R.Wieser" <address@not.available> - 2016-01-12 21:28 +0100
                  Re: parsing print_r() output with preg_match_all() - question remains unanswered ... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-12 14:02 +0000
              Re: parsing print_r() output with preg_match_all() - question remains unanswered ... "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-12 12:42 +0100
                Re: parsing print_r() output with preg_match_all() - question remainsunanswered ... "R.Wieser" <address@not.available> - 2016-01-12 14:20 +0100
              Re: parsing print_r() output with preg_match_all() - question remains unanswered ... Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-12 09:43 -0500
                Re: parsing print_r() output with preg_match_all() - question remainsunanswered ... "R.Wieser" <address@not.available> - 2016-01-12 16:11 +0100

Page 4 of 6 — ← Prev page 1 2 3 [4] 5 6  Next page →


#16254

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-13 17:20 -0500
Message-ID<n76iej$q6j$2@jstuckle.eternal-september.org>
In reply to#16251
On 1/13/2016 4:24 PM, Ian Collins wrote:
> Jerry Stuckle wrote:
>> On 1/13/2016 12:39 AM, Arno Welzel wrote:
> 
>>> It seems you really don't understand what I'm talking about. I mentioned
>>> JSON as a human readable standard instead of using var_dump() since
>>> var_dump() is not meant to be parsed. Then you said that I don't know
>>> what a standard is and that JSON is not "human readable". I even believe
>>> you don't know what "human readable" really means. Hint: the numbers
>>> above an GTIN-13 bar code are "human readable" even if you don't know
>>> what they mean - but at least you can read them in case the barcode
>>> reader does not work.
>>
>> Sure, I know what JSON is all about, troll.  But no matter how you cut
>> it, you can create XML much more human readable than JSON.  But you've
>> never done anything with XML, so you have no idea what it's about.
> 
> The hypervisor OS I use uses JSON for all of its configuration and
> status output.  It's clearly an easy format for both normal humans and
> machines to read.
> 

It is - IF you know what you're looking at.  But give that to someone
who isn't familiar with JSON and expect them to understand it.  Unlike
the output of print_r(), which is easy to understand, and XML, which can
be made to be quite easy to understand, if if the person doesn't
understand PHP, or XML.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16257

FromIan Collins <ian-news@hotmail.com>
Date2016-01-14 12:14 +1300
Message-ID<dfo42sFlbg7U3@mid.individual.net>
In reply to#16254
Jerry Stuckle wrote:
> On 1/13/2016 4:24 PM, Ian Collins wrote:
>>
>> The hypervisor OS I use uses JSON for all of its configuration and
>> status output.  It's clearly an easy format for both normal humans and
>> machines to read.
>>
>
> It is - IF you know what you're looking at.  But give that to someone
> who isn't familiar with JSON and expect them to understand it.  Unlike
> the output of print_r(), which is easy to understand, and XML, which can
> be made to be quite easy to understand, if if the person doesn't
> understand PHP, or XML.

Given the first example on the print_r() manual page, do you think 
anyone who understands this:

<?php
$a = array ('a' => 'apple', 'b' => 'banana',
             'c' => array ('x', 'y', 'z'));
print_r ($a);
?>

Array
(
     [a] => apple
     [b] => banana
     [c] => Array
         (
             [0] => x
             [1] => y
             [2] => z
         )

)

would have trouble understanding this?

<?php
$a = array ('a' => 'apple', 'b' => 'banana',
             'c' => array ('x', 'y', 'z'));
echo json_encode($a,JSON_PRETTY_PRINT);
?>

{
     "a": "apple",
     "b": "banana",
     "c": [
         "x",
         "y",
         "z"
     ]
}

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#16260

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-13 19:18 -0500
Message-ID<n76pbv$kou$2@jstuckle.eternal-september.org>
In reply to#16257
On 1/13/2016 6:14 PM, Ian Collins wrote:
> Jerry Stuckle wrote:
>> On 1/13/2016 4:24 PM, Ian Collins wrote:
>>>
>>> The hypervisor OS I use uses JSON for all of its configuration and
>>> status output.  It's clearly an easy format for both normal humans and
>>> machines to read.
>>>
>>
>> It is - IF you know what you're looking at.  But give that to someone
>> who isn't familiar with JSON and expect them to understand it.  Unlike
>> the output of print_r(), which is easy to understand, and XML, which can
>> be made to be quite easy to understand, if if the person doesn't
>> understand PHP, or XML.
> 
> Given the first example on the print_r() manual page, do you think
> anyone who understands this:
> 
> <?php
> $a = array ('a' => 'apple', 'b' => 'banana',
>             'c' => array ('x', 'y', 'z'));
> print_r ($a);
> ?>
> 
> Array
> (
>     [a] => apple
>     [b] => banana
>     [c] => Array
>         (
>             [0] => x
>             [1] => y
>             [2] => z
>         )
> 
> )
> 
> would have trouble understanding this?
> 
> <?php
> $a = array ('a' => 'apple', 'b' => 'banana',
>             'c' => array ('x', 'y', 'z'));
> echo json_encode($a,JSON_PRETTY_PRINT);
> ?>
> 
> {
>     "a": "apple",
>     "b": "banana",
>     "c": [
>         "x",
>         "y",
>         "z"
>     ]
> }
> 

Yes. The former is much more clear.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16265

FromArno Welzel <usenet@arnowelzel.de>
Date2016-01-14 08:34 +0100
Message-ID<56974F6B.1040705@arnowelzel.de>
In reply to#16260
Jerry Stuckle schrieb am 2016-01-14 um 01:18:

> On 1/13/2016 6:14 PM, Ian Collins wrote:
[...]
>> Given the first example on the print_r() manual page, do you think
>> anyone who understands this:
>>
>> <?php
>> $a = array ('a' => 'apple', 'b' => 'banana',
>>             'c' => array ('x', 'y', 'z'));
>> print_r ($a);
>> ?>
>>
>> Array
>> (
>>     [a] => apple
>>     [b] => banana
>>     [c] => Array
>>         (
>>             [0] => x
>>             [1] => y
>>             [2] => z
>>         )
>>
>> )
>>
>> would have trouble understanding this?
>>
>> <?php
>> $a = array ('a' => 'apple', 'b' => 'banana',
>>             'c' => array ('x', 'y', 'z'));
>> echo json_encode($a,JSON_PRETTY_PRINT);
>> ?>
>>
>> {
>>     "a": "apple",
>>     "b": "banana",
>>     "c": [
>>         "x",
>>         "y",
>>         "z"
>>     ]
>> }
>>
> 
> Yes. The former is much more clear.

If something is "more clear" totally depends on what people are used to
work with. In fact both textual representations are perfectly
*readable*. On can *read* the content.

If one does not have any experience with XML, even this may not be clear
to him:

<elements>
  <element key="a" value="apple" />
  <element key="b" value="banana" />
  <element key="c">
    <element key="0" value="x" />
    <element key="1" value="y" />
    <element key="3" value="z" />
  </element>
</elements>

And is the key always a string or will numbers be treated different? In
JSON it is possible to differentiate the data type as well, if needed:

{
    "a": "apple",
    "b": "banana",
    "c": [
        1,
        2,
        3
    ]
}


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [next] | [standalone]


#16268

FromAnders Wegge Keller <wegge@geostat.dk>
Date2016-01-14 09:20 +0100
Message-ID<20160114092044.04ce166e@geostat.dk>
In reply to#16265
On Thu, 14 Jan 2016 08:34:03 +0100
Arno Welzel <usenet@arnowelzel.de> wrote:

> If one does not have any experience with XML, even this may not be clear
> to him:
> 
> <elements>
>   <element key="a" value="apple" />
>   <element key="b" value="banana" />
>   <element key="c">
>     <element key="0" value="x" />
>     <element key="1" value="y" />
>     <element key="3" value="z" />
>   </element>
> </elements>
> 
> And is the key always a string or will numbers be treated different? In
> JSON it is possible to differentiate the data type as well, if needed:
> 
> {
>     "a": "apple",
>     "b": "banana",
>     "c": [
>         1,
>         2,
>         3
>     ]
> }
> 
> 

 Didn't OP state "Human readable" as a requirement? The S/N ratio is much
better with JSON. For this simple structure, it is manageable, but when you
get a multi-megabyt XML file, it is time to bring out the special tools. 

-- 
//Wegge

[toc] | [prev] | [next] | [standalone]


#16269

FromIan Collins <ian-news@hotmail.com>
Date2016-01-14 21:56 +1300
Message-ID<dfp66aFlbg7U8@mid.individual.net>
In reply to#16268
Anders Wegge Keller wrote:
> On Thu, 14 Jan 2016 08:34:03 +0100
> Arno Welzel <usenet@arnowelzel.de> wrote:
>
>> If one does not have any experience with XML, even this may not be clear
>> to him:
>>
>> <elements>
>>    <element key="a" value="apple" />
>>    <element key="b" value="banana" />
>>    <element key="c">
>>      <element key="0" value="x" />
>>      <element key="1" value="y" />
>>      <element key="3" value="z" />
>>    </element>
>> </elements>
>>
>> And is the key always a string or will numbers be treated different? In
>> JSON it is possible to differentiate the data type as well, if needed:
>>
>> {
>>      "a": "apple",
>>      "b": "banana",
>>      "c": [
>>          1,
>>          2,
>>          3
>>      ]
>> }
>>
>>
>
>   Didn't OP state "Human readable" as a requirement? The S/N ratio is much
> better with JSON. For this simple structure, it is manageable, but when you
> get a multi-megabyt XML file, it is time to bring out the special tools.

Very true.

The JSON representation will be shorter (with or without pretty 
printing) than the output of print_r() while conveying the same 
information.  It also has the advantage of built in encoder and decoder 
- no messing with manual parsing.

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#16277

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-14 16:08 -0500
Message-ID<n792j5$4ij$2@jstuckle.eternal-september.org>
In reply to#16265
On 1/14/2016 2:34 AM, Arno Welzel wrote:
> Jerry Stuckle schrieb am 2016-01-14 um 01:18:
> 
>> On 1/13/2016 6:14 PM, Ian Collins wrote:
> [...]
>>> Given the first example on the print_r() manual page, do you think
>>> anyone who understands this:
>>>
>>> <?php
>>> $a = array ('a' => 'apple', 'b' => 'banana',
>>>             'c' => array ('x', 'y', 'z'));
>>> print_r ($a);
>>> ?>
>>>
>>> Array
>>> (
>>>     [a] => apple
>>>     [b] => banana
>>>     [c] => Array
>>>         (
>>>             [0] => x
>>>             [1] => y
>>>             [2] => z
>>>         )
>>>
>>> )
>>>
>>> would have trouble understanding this?
>>>
>>> <?php
>>> $a = array ('a' => 'apple', 'b' => 'banana',
>>>             'c' => array ('x', 'y', 'z'));
>>> echo json_encode($a,JSON_PRETTY_PRINT);
>>> ?>
>>>
>>> {
>>>     "a": "apple",
>>>     "b": "banana",
>>>     "c": [
>>>         "x",
>>>         "y",
>>>         "z"
>>>     ]
>>> }
>>>
>>
>> Yes. The former is much more clear.
> 
> If something is "more clear" totally depends on what people are used to
> work with. In fact both textual representations are perfectly
> *readable*. On can *read* the content.
> 
> If one does not have any experience with XML, even this may not be clear
> to him:
> 
> <elements>
>   <element key="a" value="apple" />
>   <element key="b" value="banana" />
>   <element key="c">
>     <element key="0" value="x" />
>     <element key="1" value="y" />
>     <element key="3" value="z" />
>   </element>
> </elements>
>

If you think this is what XML has to look like, then no wonder you think
JSON is more readable.  But it also goes to show that you do NOT
understand XML.

I suggest you learn how to write good XML before making a fool of
yourself (again), troll.

> And is the key always a string or will numbers be treated different? In 
> JSON it is possible to differentiate the data type as well, if needed:
> 
> {
>     "a": "apple",
>     "b": "banana",
>     "c": [
>         1,
>         2,
>         3
>     ]
> }
> 
> 

And who cares?

BTW - I showed this to my neighbor (who is not a programmer).  He had
absolutely no idea what it meant.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16280

FromArno Welzel <usenet@arnowelzel.de>
Date2016-01-14 22:55 +0100
Message-ID<56981956.4000100@arnowelzel.de>
In reply to#16277
Jerry Stuckle schrieb am 2016-01-14 um 22:08:

> On 1/14/2016 2:34 AM, Arno Welzel wrote:
>> Jerry Stuckle schrieb am 2016-01-14 um 01:18:
>>
>>> On 1/13/2016 6:14 PM, Ian Collins wrote:
>> [...]
>>>> Given the first example on the print_r() manual page, do you think
>>>> anyone who understands this:
>>>>
>>>> <?php
>>>> $a = array ('a' => 'apple', 'b' => 'banana',
>>>>             'c' => array ('x', 'y', 'z'));
>>>> print_r ($a);
>>>> ?>
>>>>
>>>> Array
>>>> (
>>>>     [a] => apple
>>>>     [b] => banana
>>>>     [c] => Array
>>>>         (
>>>>             [0] => x
>>>>             [1] => y
>>>>             [2] => z
>>>>         )
>>>>
>>>> )
>>>>
>>>> would have trouble understanding this?
>>>>
>>>> <?php
>>>> $a = array ('a' => 'apple', 'b' => 'banana',
>>>>             'c' => array ('x', 'y', 'z'));
>>>> echo json_encode($a,JSON_PRETTY_PRINT);
>>>> ?>
>>>>
>>>> {
>>>>     "a": "apple",
>>>>     "b": "banana",
>>>>     "c": [
>>>>         "x",
>>>>         "y",
>>>>         "z"
>>>>     ]
>>>> }
>>>>
>>>
>>> Yes. The former is much more clear.
>>
>> If something is "more clear" totally depends on what people are used to
>> work with. In fact both textual representations are perfectly
>> *readable*. On can *read* the content.
>>
>> If one does not have any experience with XML, even this may not be clear
>> to him:
>>
>> <elements>
>>   <element key="a" value="apple" />
>>   <element key="b" value="banana" />
>>   <element key="c">
>>     <element key="0" value="x" />
>>     <element key="1" value="y" />
>>     <element key="3" value="z" />
>>   </element>
>> </elements>
>>
> 
> If you think this is what XML has to look like, then no wonder you think
> JSON is more readable.  But it also goes to show that you do NOT
> understand XML.

I don't say XML has to look like this - but there is no more information
available.

Feel free to show a better "readable" example which represents the
*same* information and not introducing additional information which
wasn't their before.

> I suggest you learn how to write good XML before making a fool of
> yourself (again), troll.

I suggest you show some of your knowledge instead of accusing everone
else of not knowing what they talk about.

I alread did show something, Ian as well - now it's your turn.



-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [next] | [standalone]


#16281

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-14 16:59 -0500
Message-ID<n795in$fr0$1@jstuckle.eternal-september.org>
In reply to#16280
On 1/14/2016 4:55 PM, Arno Welzel wrote:
> Jerry Stuckle schrieb am 2016-01-14 um 22:08:
> 
>> On 1/14/2016 2:34 AM, Arno Welzel wrote:
>>> Jerry Stuckle schrieb am 2016-01-14 um 01:18:
>>>
>>>> On 1/13/2016 6:14 PM, Ian Collins wrote:
>>> [...]
>>>>> Given the first example on the print_r() manual page, do you think
>>>>> anyone who understands this:
>>>>>
>>>>> <?php
>>>>> $a = array ('a' => 'apple', 'b' => 'banana',
>>>>>             'c' => array ('x', 'y', 'z'));
>>>>> print_r ($a);
>>>>> ?>
>>>>>
>>>>> Array
>>>>> (
>>>>>     [a] => apple
>>>>>     [b] => banana
>>>>>     [c] => Array
>>>>>         (
>>>>>             [0] => x
>>>>>             [1] => y
>>>>>             [2] => z
>>>>>         )
>>>>>
>>>>> )
>>>>>
>>>>> would have trouble understanding this?
>>>>>
>>>>> <?php
>>>>> $a = array ('a' => 'apple', 'b' => 'banana',
>>>>>             'c' => array ('x', 'y', 'z'));
>>>>> echo json_encode($a,JSON_PRETTY_PRINT);
>>>>> ?>
>>>>>
>>>>> {
>>>>>     "a": "apple",
>>>>>     "b": "banana",
>>>>>     "c": [
>>>>>         "x",
>>>>>         "y",
>>>>>         "z"
>>>>>     ]
>>>>> }
>>>>>
>>>>
>>>> Yes. The former is much more clear.
>>>
>>> If something is "more clear" totally depends on what people are used to
>>> work with. In fact both textual representations are perfectly
>>> *readable*. On can *read* the content.
>>>
>>> If one does not have any experience with XML, even this may not be clear
>>> to him:
>>>
>>> <elements>
>>>   <element key="a" value="apple" />
>>>   <element key="b" value="banana" />
>>>   <element key="c">
>>>     <element key="0" value="x" />
>>>     <element key="1" value="y" />
>>>     <element key="3" value="z" />
>>>   </element>
>>> </elements>
>>>
>>
>> If you think this is what XML has to look like, then no wonder you think
>> JSON is more readable.  But it also goes to show that you do NOT
>> understand XML.
> 
> I don't say XML has to look like this - but there is no more information
> available.
> 
> Feel free to show a better "readable" example which represents the
> *same* information and not introducing additional information which
> wasn't their before.
> 
>> I suggest you learn how to write good XML before making a fool of
>> yourself (again), troll.
> 
> I suggest you show some of your knowledge instead of accusing everone
> else of not knowing what they talk about.
> 
> I alread did show something, Ian as well - now it's your turn.
> 
> 
> 

Yea, right, troll.  I'm not going to teach you about XML.  This is a PHP
newsgroup.  I suggest you try some of the XML tutorials.

But you're too stoopid to understand them.  You've already shown that.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16282

FromArno Welzel <usenet@arnowelzel.de>
Date2016-01-14 23:09 +0100
Message-ID<56981C8F.6040606@arnowelzel.de>
In reply to#16281
Jerry Stuckle schrieb am 2016-01-14 um 22:59:

[...]
> Yea, right, troll.  I'm not going to teach you about XML.  This is a PHP
> newsgroup.  I suggest you try some of the XML tutorials.

Aha - "this is a PHP newsgroup". And why are you writing dozens of
postings about different topics then and not just ignore these postings?

> But you're too stoopid to understand them.  You've already shown that.

So you admit you can't even show a simple example of what you call a
good example for "understandable XML"? And you think people believe you
when you say you know what you're talking about? Really?


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [next] | [standalone]


#16283

FromIan Collins <ian-news@hotmail.com>
Date2016-01-15 11:17 +1300
Message-ID<dfql3cFr4b2U1@mid.individual.net>
In reply to#16282
Arno Welzel wrote:
> Jerry Stuckle schrieb am 2016-01-14 um 22:59:
>
> [...]
>> Yea, right, troll.  I'm not going to teach you about XML.  This is a PHP
>> newsgroup.  I suggest you try some of the XML tutorials.
>
> Aha - "this is a PHP newsgroup". And why are you writing dozens of
> postings about different topics then and not just ignore these postings?
>
>> But you're too stoopid to understand them.  You've already shown that.
>
> So you admit you can't even show a simple example of what you call a
> good example for "understandable XML"? And you think people believe you
> when you say you know what you're talking about? Really?

"I learned long ago, never to wrestle with a pig. You get dirty, and 
besides, the pig likes it."

George Bernard Shaw

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#16285

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-14 19:15 -0500
Message-ID<n79di0$f3a$2@jstuckle.eternal-september.org>
In reply to#16283
On 1/14/2016 5:17 PM, Ian Collins wrote:
> Arno Welzel wrote:
>> Jerry Stuckle schrieb am 2016-01-14 um 22:59:
>>
>> [...]
>>> Yea, right, troll.  I'm not going to teach you about XML.  This is a PHP
>>> newsgroup.  I suggest you try some of the XML tutorials.
>>
>> Aha - "this is a PHP newsgroup". And why are you writing dozens of
>> postings about different topics then and not just ignore these postings?
>>
>>> But you're too stoopid to understand them.  You've already shown that.
>>
>> So you admit you can't even show a simple example of what you call a
>> good example for "understandable XML"? And you think people believe you
>> when you say you know what you're talking about? Really?
> 
> "I learned long ago, never to wrestle with a pig. You get dirty, and
> besides, the pig likes it."
> 
> George Bernard Shaw
> 

You're right, Ian.  I need to stop arguing with the troll.  He's too
stoopid to be worth it.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16284

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-14 19:14 -0500
Message-ID<n79dgh$f3a$1@jstuckle.eternal-september.org>
In reply to#16282
On 1/14/2016 5:09 PM, Arno Welzel wrote:
> Jerry Stuckle schrieb am 2016-01-14 um 22:59:
> 
> [...]
>> Yea, right, troll.  I'm not going to teach you about XML.  This is a PHP
>> newsgroup.  I suggest you try some of the XML tutorials.
> 
> Aha - "this is a PHP newsgroup". And why are you writing dozens of
> postings about different topics then and not just ignore these postings?
> 
>> But you're too stoopid to understand them.  You've already shown that.
> 
> So you admit you can't even show a simple example of what you call a
> good example for "understandable XML"? And you think people believe you
> when you say you know what you're talking about? Really?
> 
> 

Arno, only a troll would expect someone to give them free lessons on a
subject that's off-topic in the newsgroup.  But then that describes you
to a T.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16191

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-11 20:50 -0500
Message-ID<n71lvk$tba$2@jstuckle.eternal-september.org>
In reply to#16184
On 1/11/2016 5:48 PM, Arno Welzel wrote:
> Jerry Stuckle schrieb am 2016-01-11 um 14:04:
>> On 1/11/2016 3:11 AM, Arno Welzel wrote:
>>> R.Wieser schrieb am 2016-01-06 um 20:50:
>>>
>>>> Ben,
>>>>
>>>>> It would be a lot simpler if you could switch to using
>>>>> serialize and unserialize.  Do you need to use print_r
>>>>> for some other reason?
>>>>
>>>> I'm using it to store the array-of-arrays into a file in human-readable
>>>> format.  I intend to parse this file using another program, posibly alter
>>>> some info and write it back.
>>>>
>>>> And thats the point where I wanted to use that regex to read the structure
>>>> back in.
>>>>
>>>> Now you mention it, I've heard from serializing and unserializing, but
>>>> was/am assuming that its not really ment to be read/understood by humans.
>>>>
>>>> But what's the problem with using that preg_match_all() ?
>>>
>>> It's prone to errors to build a parser on your own and there are already
>>> working and tested(!) solutions.
>>>
>>> May JSON is a good alternative for you:
>>>
>>> <http://php.net/manual/en/function.json-encode.php>
>>> <http://php.net/manual/en/function.json-decode.php>
>>>
>>> JSON is still "human readable" but also a defined format and there are
>>> parsers for other programming languages as well.
>>>
>>>
>>
>> Gee, who built the parsers we have?  Machines?  ROFLMAO!
> 
> No - but there are *standards* you can refer to which are usually way
> better then trying to invent the wheel over and over again.
>

You wouldn't know.  You have no idea what standards are.

>> It's not easy - but not everyone is as incompetent as you are, Arno.  In
>> fact, most people are much more competent.
> 
> I know you have your problems with standards. You don't have to
> emphasize this all the time over and over again.
> 
> 

I have no problem with standards.  My only problem is with trolls like
you who think standards are something to be ignored - or even better,
that you know more than the standards.

But your comments are what are expected from a troll.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16197

FromArno Welzel <usenet@arnowelzel.de>
Date2016-01-12 05:42 +0100
Message-ID<56948447.9030208@arnowelzel.de>
In reply to#16191
Jerry Stuckle schrieb am 2016-01-12 um 02:50:

> On 1/11/2016 5:48 PM, Arno Welzel wrote:
>> Jerry Stuckle schrieb am 2016-01-11 um 14:04:
>>> On 1/11/2016 3:11 AM, Arno Welzel wrote:
>>>> R.Wieser schrieb am 2016-01-06 um 20:50:
>>>>
>>>>> Ben,
>>>>>
>>>>>> It would be a lot simpler if you could switch to using
>>>>>> serialize and unserialize.  Do you need to use print_r
>>>>>> for some other reason?
>>>>>
>>>>> I'm using it to store the array-of-arrays into a file in human-readable
>>>>> format.  I intend to parse this file using another program, posibly alter
>>>>> some info and write it back.
>>>>>
>>>>> And thats the point where I wanted to use that regex to read the structure
>>>>> back in.
>>>>>
>>>>> Now you mention it, I've heard from serializing and unserializing, but
>>>>> was/am assuming that its not really ment to be read/understood by humans.
>>>>>
>>>>> But what's the problem with using that preg_match_all() ?
>>>>
>>>> It's prone to errors to build a parser on your own and there are already
>>>> working and tested(!) solutions.
>>>>
>>>> May JSON is a good alternative for you:
>>>>
>>>> <http://php.net/manual/en/function.json-encode.php>
>>>> <http://php.net/manual/en/function.json-decode.php>
>>>>
>>>> JSON is still "human readable" but also a defined format and there are
>>>> parsers for other programming languages as well.
>>>>
>>>>
>>>
>>> Gee, who built the parsers we have?  Machines?  ROFLMAO!
>>
>> No - but there are *standards* you can refer to which are usually way
>> better then trying to invent the wheel over and over again.
>>
> 
> You wouldn't know.  You have no idea what standards are.

What you call ECMA then? An organization of trolls?


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [next] | [standalone]


#16198

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2016-01-12 08:41 +0100
Message-ID<1864872.37QgWG5pTE@PointedEars.de>
In reply to#16197
Arno Welzel wrote:

> What you call ECMA then? […]

_Ecma International_

-- 
PointedEars
Zend Certified PHP Engineer 
<http://www.zend.com/en/yellow-pages/ZEND024953> | Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#16213

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-12 09:13 -0500
Message-ID<n731gv$5dh$2@jstuckle.eternal-september.org>
In reply to#16197
On 1/11/2016 11:42 PM, Arno Welzel wrote:
> Jerry Stuckle schrieb am 2016-01-12 um 02:50:
> 
>> On 1/11/2016 5:48 PM, Arno Welzel wrote:
>>> Jerry Stuckle schrieb am 2016-01-11 um 14:04:
>>>> On 1/11/2016 3:11 AM, Arno Welzel wrote:
>>>>> R.Wieser schrieb am 2016-01-06 um 20:50:
>>>>>
>>>>>> Ben,
>>>>>>
>>>>>>> It would be a lot simpler if you could switch to using
>>>>>>> serialize and unserialize.  Do you need to use print_r
>>>>>>> for some other reason?
>>>>>>
>>>>>> I'm using it to store the array-of-arrays into a file in human-readable
>>>>>> format.  I intend to parse this file using another program, posibly alter
>>>>>> some info and write it back.
>>>>>>
>>>>>> And thats the point where I wanted to use that regex to read the structure
>>>>>> back in.
>>>>>>
>>>>>> Now you mention it, I've heard from serializing and unserializing, but
>>>>>> was/am assuming that its not really ment to be read/understood by humans.
>>>>>>
>>>>>> But what's the problem with using that preg_match_all() ?
>>>>>
>>>>> It's prone to errors to build a parser on your own and there are already
>>>>> working and tested(!) solutions.
>>>>>
>>>>> May JSON is a good alternative for you:
>>>>>
>>>>> <http://php.net/manual/en/function.json-encode.php>
>>>>> <http://php.net/manual/en/function.json-decode.php>
>>>>>
>>>>> JSON is still "human readable" but also a defined format and there are
>>>>> parsers for other programming languages as well.
>>>>>
>>>>>
>>>>
>>>> Gee, who built the parsers we have?  Machines?  ROFLMAO!
>>>
>>> No - but there are *standards* you can refer to which are usually way
>>> better then trying to invent the wheel over and over again.
>>>
>>
>> You wouldn't know.  You have no idea what standards are.
> 
> What you call ECMA then? An organization of trolls?
> 
> 

I know what ECMA is.  But you have no idea what standards are, troll.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16224

FromArno Welzel <usenet@arnowelzel.de>
Date2016-01-12 21:44 +0100
Message-ID<569565BA.2020802@arnowelzel.de>
In reply to#16213
Jerry Stuckle schrieb am 2016-01-12 um 15:13:

> On 1/11/2016 11:42 PM, Arno Welzel wrote:
>> Jerry Stuckle schrieb am 2016-01-12 um 02:50:
>>
>>> On 1/11/2016 5:48 PM, Arno Welzel wrote:
>>>> Jerry Stuckle schrieb am 2016-01-11 um 14:04:
>>>>> On 1/11/2016 3:11 AM, Arno Welzel wrote:
>>>>>> R.Wieser schrieb am 2016-01-06 um 20:50:
>>>>>>
>>>>>>> Ben,
>>>>>>>
>>>>>>>> It would be a lot simpler if you could switch to using
>>>>>>>> serialize and unserialize.  Do you need to use print_r
>>>>>>>> for some other reason?
>>>>>>>
>>>>>>> I'm using it to store the array-of-arrays into a file in human-readable
>>>>>>> format.  I intend to parse this file using another program, posibly alter
>>>>>>> some info and write it back.
>>>>>>>
>>>>>>> And thats the point where I wanted to use that regex to read the structure
>>>>>>> back in.
>>>>>>>
>>>>>>> Now you mention it, I've heard from serializing and unserializing, but
>>>>>>> was/am assuming that its not really ment to be read/understood by humans.
>>>>>>>
>>>>>>> But what's the problem with using that preg_match_all() ?
>>>>>>
>>>>>> It's prone to errors to build a parser on your own and there are already
>>>>>> working and tested(!) solutions.
>>>>>>
>>>>>> May JSON is a good alternative for you:
>>>>>>
>>>>>> <http://php.net/manual/en/function.json-encode.php>
>>>>>> <http://php.net/manual/en/function.json-decode.php>
>>>>>>
>>>>>> JSON is still "human readable" but also a defined format and there are
>>>>>> parsers for other programming languages as well.
>>>>>>
>>>>>>
>>>>>
>>>>> Gee, who built the parsers we have?  Machines?  ROFLMAO!
>>>>
>>>> No - but there are *standards* you can refer to which are usually way
>>>> better then trying to invent the wheel over and over again.
>>>>
>>>
>>> You wouldn't know.  You have no idea what standards are.
>>
>> What you call ECMA then? An organization of trolls?
>>
>>
> 
> I know what ECMA is.  But you have no idea what standards are, troll.


You did it again. QED.



-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [next] | [standalone]


#16226

FromJerry Stuckle <jstucklex@attglobal.net>
Date2016-01-12 16:13 -0500
Message-ID<n73q4m$bba$2@jstuckle.eternal-september.org>
In reply to#16224
On 1/12/2016 3:44 PM, Arno Welzel wrote:
> Jerry Stuckle schrieb am 2016-01-12 um 15:13:
> 
>> On 1/11/2016 11:42 PM, Arno Welzel wrote:
>>> Jerry Stuckle schrieb am 2016-01-12 um 02:50:
>>>
>>>> On 1/11/2016 5:48 PM, Arno Welzel wrote:
>>>>> Jerry Stuckle schrieb am 2016-01-11 um 14:04:
>>>>>> On 1/11/2016 3:11 AM, Arno Welzel wrote:
>>>>>>> R.Wieser schrieb am 2016-01-06 um 20:50:
>>>>>>>
>>>>>>>> Ben,
>>>>>>>>
>>>>>>>>> It would be a lot simpler if you could switch to using
>>>>>>>>> serialize and unserialize.  Do you need to use print_r
>>>>>>>>> for some other reason?
>>>>>>>>
>>>>>>>> I'm using it to store the array-of-arrays into a file in human-readable
>>>>>>>> format.  I intend to parse this file using another program, posibly alter
>>>>>>>> some info and write it back.
>>>>>>>>
>>>>>>>> And thats the point where I wanted to use that regex to read the structure
>>>>>>>> back in.
>>>>>>>>
>>>>>>>> Now you mention it, I've heard from serializing and unserializing, but
>>>>>>>> was/am assuming that its not really ment to be read/understood by humans.
>>>>>>>>
>>>>>>>> But what's the problem with using that preg_match_all() ?
>>>>>>>
>>>>>>> It's prone to errors to build a parser on your own and there are already
>>>>>>> working and tested(!) solutions.
>>>>>>>
>>>>>>> May JSON is a good alternative for you:
>>>>>>>
>>>>>>> <http://php.net/manual/en/function.json-encode.php>
>>>>>>> <http://php.net/manual/en/function.json-decode.php>
>>>>>>>
>>>>>>> JSON is still "human readable" but also a defined format and there are
>>>>>>> parsers for other programming languages as well.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Gee, who built the parsers we have?  Machines?  ROFLMAO!
>>>>>
>>>>> No - but there are *standards* you can refer to which are usually way
>>>>> better then trying to invent the wheel over and over again.
>>>>>
>>>>
>>>> You wouldn't know.  You have no idea what standards are.
>>>
>>> What you call ECMA then? An organization of trolls?
>>>
>>>
>>
>> I know what ECMA is.  But you have no idea what standards are, troll.
> 
> 
> You did it again. QED.
> 

Trying to put words in my mouth again I see, troll.  It doesn't work -
it just makes you look even more stoopid.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#16229

FromArno Welzel <usenet@arnowelzel.de>
Date2016-01-12 22:29 +0100
Message-ID<56957034.90807@arnowelzel.de>
In reply to#16226
Jerry Stuckle schrieb am 2016-01-12 um 22:13:
> On 1/12/2016 3:44 PM, Arno Welzel wrote:
>> Jerry Stuckle schrieb am 2016-01-12 um 15:13:
>>
>>> On 1/11/2016 11:42 PM, Arno Welzel wrote:
>>>> Jerry Stuckle schrieb am 2016-01-12 um 02:50:
>>>>
>>>>> On 1/11/2016 5:48 PM, Arno Welzel wrote:
>>>>>> Jerry Stuckle schrieb am 2016-01-11 um 14:04:
>>>>>>> On 1/11/2016 3:11 AM, Arno Welzel wrote:
>>>>>>>> R.Wieser schrieb am 2016-01-06 um 20:50:
>>>>>>>>
>>>>>>>>> Ben,
>>>>>>>>>
>>>>>>>>>> It would be a lot simpler if you could switch to using
>>>>>>>>>> serialize and unserialize.  Do you need to use print_r
>>>>>>>>>> for some other reason?
>>>>>>>>>
>>>>>>>>> I'm using it to store the array-of-arrays into a file in human-readable
>>>>>>>>> format.  I intend to parse this file using another program, posibly alter
>>>>>>>>> some info and write it back.
>>>>>>>>>
>>>>>>>>> And thats the point where I wanted to use that regex to read the structure
>>>>>>>>> back in.
>>>>>>>>>
>>>>>>>>> Now you mention it, I've heard from serializing and unserializing, but
>>>>>>>>> was/am assuming that its not really ment to be read/understood by humans.
>>>>>>>>>
>>>>>>>>> But what's the problem with using that preg_match_all() ?
>>>>>>>>
>>>>>>>> It's prone to errors to build a parser on your own and there are already
>>>>>>>> working and tested(!) solutions.
>>>>>>>>
>>>>>>>> May JSON is a good alternative for you:
>>>>>>>>
>>>>>>>> <http://php.net/manual/en/function.json-encode.php>
>>>>>>>> <http://php.net/manual/en/function.json-decode.php>
>>>>>>>>
>>>>>>>> JSON is still "human readable" but also a defined format and there are
>>>>>>>> parsers for other programming languages as well.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> Gee, who built the parsers we have?  Machines?  ROFLMAO!
>>>>>>
>>>>>> No - but there are *standards* you can refer to which are usually way
>>>>>> better then trying to invent the wheel over and over again.
>>>>>>
>>>>>
>>>>> You wouldn't know.  You have no idea what standards are.
>>>>
>>>> What you call ECMA then? An organization of trolls?
>>>>
>>>>
>>>
>>> I know what ECMA is.  But you have no idea what standards are, troll.
>>
>>
>> You did it again. QED.
>>
> 
> Trying to put words in my mouth again I see, troll.  It doesn't work -
> it just makes you look even more stoopid.

You did it again. QED.

Oh - and you will repeat this many, many times and will never believe
that your behaviour is inappropriate.


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [next] | [standalone]


Page 4 of 6 — ← Prev page 1 2 3 [4] 5 6  Next page →

Back to top | Article view | comp.lang.php


csiph-web