How do I access a php array value containing a forward slash -


this question has answer here:

i've been around these yer' internets many time , seem able find answer. have tried every combination can think of.

i have array

["results"]=> array(20) { [0]=> object(stdclass)#5 (6)  ["area"]=> string(9) "flint, mi" ["tag/_text"]=> string(11) "sevenseas" .... 

i'm trying access "tag/_text" within loop can't seem to

foreach ($holder $dets) {     $tag  = $dets->tag/_text;      $area  = $dets->area;  } 

how $tag value?

you might want read http://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex explains can use curly brackets create complex expressions.

you can access property of object following expression $dets->{'tag/_text'}


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -