Help me please json_decode

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
User avatar
angelpeace
Forum Members
Forum Members
Posts: 39
Joined: Fri May 15, 2009 9:45 am

Help me please json_decode

Post by angelpeace »

I have an Example:

$mystring = '{"en":"<p>about en</p>","fr":"about fr","jp":"about jp"}';
$parseToArray = json_decode($mystring);
....
$aboutus = $parseToArray->$stringLang; //en,fr,jp
return false;

Else
$mystring = '{"en":"about en","fr":"about fr","jp":"about jp"}';
return Result;

I want to result return:
- en = <p>about en</p>
- fr = about fr
- jp = about jp

How can i do?
Help me.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Help me please json_decode

Post by Dr.CSS »

I don't know about anyone else but I would need a lot more info as to what you want to happen for what reason and how you want to use this before I could help, not that I know json...

more info = more help
User avatar
angelpeace
Forum Members
Forum Members
Posts: 39
Joined: Fri May 15, 2009 9:45 am

Re: Help me please json_decode

Post by angelpeace »

Thanks Dr.CSS,

I Have:
$mystring = '{"en":"<p>about en</p>","fr":"about fr","jp":"about jp"}';

And I want to result return:
- en = <p>about en</p>
- fr = about fr
- jp = about jp

How can i do, by anywhere???
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Help me please json_decode

Post by calguy1000 »

Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “The Lounge”