Page 1 of 1

pls help me ! how to get this value

Posted: Thu Aug 31, 2006 8:47 am
by dreamnet
I use json to get the value of xml with following getValue code:
$title =$json->forumid->title;
for example, if I use this code can do the output "my subject";

but since other reason ,i have to store "forumid->title" in
<input type="hidden" value="forumid->title" name="json_path" />

in my php file , I can get a varable $json_path with string value" forumid->title"

if I use $title =$json->$json_path;
will not get the output what i want "my subject", since actually, $json_path is a string rite now.

what am i going to do to get the "my subject" ?

Posted: Thu Aug 31, 2006 8:53 am
by feyd
explode() $json_path, use references to go from there.

This feels like a bad design if you need to give pathing information.

Posted: Thu Aug 31, 2006 9:01 am
by dreamnet
I dit explode , works, but json path is random deep, a little bit complicated;
how to say, what I am going to design is a backend control open tags search engine for xml files
that means all elements can be searched and which elements can show to public search engine depends on backend "open/close" to this elements