Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Jay Blanchard
[snip] Ahh, the list is in an HTML document, suddenly it all becomes clear. DOMDocument is probably your best bet here. Other HTML parsers are also available. -Stuart [/snip] Ah! Thanks for the heads up on that Stuart - I'll start my work there this afternoon. -- PHP General Mailing List (

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Stuart Dallas
On 5 Mar 2012, at 16:45, Jay Blanchard wrote: > [snip] > Difficult to answer without knowing how your data is currently stored. Gimme > a var_dump or var_export of your data and I'll be able to give you an answer. > -Stuart > [/snip] > > It is an unordered nested list as in the following exampl

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Jay Blanchard
[snip] Sounds like your tangents are efforts to accomplish things that you know too little about and don't want to spend too much time getting acquainted with. To borrow from your crude response to Mr. Dallas: You may have RTFM, now try DTFW. :) [/snip] Seriously Jim? I have been a member and

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Jay Blanchard
[snip] Difficult to answer without knowing how your data is currently stored. Gimme a var_dump or var_export of your data and I'll be able to give you an answer. -Stuart [/snip] It is an unordered nested list as in the following example - foo bar glorp -- PHP General Mailing List (http

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Jim Giner
"Jay Blanchard" wrote in message news:4f54e388.7010...@sigmaphinothing.org... > On 3/5/2012 9:53 AM, Stuart Dallas wrote: >> On 5 Mar 2012, at 15:50, Jay Blanchard wrote: >> >>> I am off on my next tangent now and I have not really thought about this >>> too much yet but have you seen a method

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Stuart Dallas
On 5 Mar 2012, at 16:24, Jay Blanchard wrote: > [snip] > $json = json_encode($nested_unordered_list); As I said, whether that works or > not depends on what type $nested_unordered_list is. If it's not made of > standard types you'll need to massage it into a structure using standard > types. :D

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Jay Blanchard
[snip] $json = json_encode($nested_unordered_list); As I said, whether that works or not depends on what type $nested_unordered_list is. If it's not made of standard types you'll need to massage it into a structure using standard types. :D [/snip] Stewie, Stewie, Stewie. :) So what you'r

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Stuart Dallas
On 5 Mar 2012, at 16:02, Jay Blanchard wrote: > On 3/5/2012 9:53 AM, Stuart Dallas wrote: >> On 5 Mar 2012, at 15:50, Jay Blanchard wrote: >> >>> I am off on my next tangent now and I have not really thought about this >>> too much yet but have you seen a method to convert a nested unordered lis

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Jay Blanchard
On 3/5/2012 9:53 AM, Stuart Dallas wrote: On 5 Mar 2012, at 15:50, Jay Blanchard wrote: I am off on my next tangent now and I have not really thought about this too much yet but have you seen a method to convert a nested unordered list into JSON using PHP? There's a very useful search functi

Re: [PHP] Converting an unordered list into JSON

2012-03-05 Thread Stuart Dallas
On 5 Mar 2012, at 15:50, Jay Blanchard wrote: > I am off on my next tangent now and I have not really thought about this too > much yet but have you seen a method to convert a nested unordered list into > JSON using PHP? There's a very useful search function for the PHP manual on the PHP site.

[PHP] Converting an unordered list into JSON

2012-03-05 Thread Jay Blanchard
Good morning PHP groupies! I am off on my next tangent now and I have not really thought about this too much yet but have you seen a method to convert a nested unordered list into JSON using PHP? Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www