Page 1 of 1

Help me please json_decode

Posted: Fri May 22, 2015 6:26 pm
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.

Re: Help me please json_decode

Posted: Fri May 22, 2015 7:38 pm
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

Re: Help me please json_decode

Posted: Fri May 22, 2015 7:42 pm
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???

Re: Help me please json_decode

Posted: Fri May 22, 2015 8:46 pm
by calguy1000