Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.php Subject: Re: parsing print_r() output with preg_match_all() Date: Thu, 07 Jan 2016 14:00:47 +0000 Organization: A noiseless patient Spider Lines: 16 Message-ID: <87vb75wkts.fsf@bsb.me.uk> References: <568d3dcf$0$23748$e4fe514c@news.xs4all.nl> <87r3huzevd.fsf@bsb.me.uk> <568d6f9c$0$23759$e4fe514c@news.xs4all.nl> <87fuyaza37.fsf@bsb.me.uk> <568e2b23$0$23766$e4fe514c@news.xs4all.nl> <87egdty6xc.fsf@bsb.me.uk> <568e60e3$1$23768$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="17667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jJywZr1gGETC9RNQH2KgKdElmVKdjWVM=" Cancel-Lock: sha1:y+NWj49OrHd7HchovGNG2nk+N7Q= sha1:458TgeN5yPmWSkj5vpeqS/7FP4k= X-BSB-Auth: 1.51c71a101e27960d917c.20160107140047GMT.87vb75wkts.fsf@bsb.me.uk Xref: csiph.com comp.lang.php:16141 "R.Wieser" writes: >> If you put each string on a line and separate the >> arrays with a blank line > > I'm sorry, I should have said that its a mix of named, and indexed strings > and sub-arrays (as shown in my initial post) > > Currently I'm parsing the data with an explode and a few normal comparisions > and a preg_match(). I think pretty-printed JSON is going to be the winner here. -- Ben.