What is this in php? what is this first time? how do I obtain the value ??? Thanks for the data sent from the taobao system. I want to take the value and store it in the database. How can I obtain the title, num php, and so on? what is this first time? how can I obtain the value ??? Thank you.
This data is sent from the taobao system. I want to take the value and store it in the database.
How can I obtain the title, num?
Share:
------ Solution --------------------
Don't understand .........
It looks like a multi-dimensional array...
------ Solution --------------------
echo {xx[items]->item}[0];[title]
echo {xx[items]->item}[0][num];
I don't know if it works. I haven't tested it.
------ Solution --------------------
Reference:
echo {xx[items]->item}[0];[title]
echo {xx[items]->item}[0][num];
I don't know if it works. I haven't tested it.
echo {xx[items]->item}[0][title];
echo {xx[items]->item}[0][num];
Xx is the variable you accept
------ Solution --------------------
Try
foreach($arr['items']->item as $v)
{
echo $v->num. ' ' .$v->title."\n";
}
------ Solution --------------------
Assume that the obtained array is $ arr.
Foreach ($ arr ['items '] as $ k => $ v ){
$ Title = $ v [0] ['title'];
$ Num = $ v [0] ['num'];
// Insert a database
}
?>