PHP encountered, what is this, the first time encountered, how to take its value??? Thank you
This data came from the Taobao system, and I'm going to take the value and deposit it into the database.
How do I get to Title,num
Share to:
------Solution--------------------
I don't know ...
Seemingly multi-dimensional array ...
------Solution--------------------
Echo {xx[items]->item}[0]; [Title]
Echo {xx[items]->item}[0][num];
I don't know, I didn't test it.
------Solution--------------------
References:
Echo {xx[items]->item}[0]; [Title]
Echo {xx[items]->item}[0][num];
I don't know, I didn't test
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--------------------
Suppose you get an array called $arr
foreach ($arr [' Items '] as $k = + $v) {
$title = $v [0][' title '];
$num = $v [0][' num '];
Insert Database
}
?>