Re: Unanticipated characters returned from multidimensional array

From: Date: Sat, 06 Aug 2011 14:44:05 +0000
Subject: Re: Unanticipated characters returned from multidimensional array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-314396@lists.php.net to get a copy of this message
On 08/06/2011 08:09 AM, David Green wrote: > foreach($tableNews as $headline => $text){ > $new_text = $text['text']; > echo "<br>"; > echo "$new_text"; > foreach ($text as $soucre => $description){ > $new_description = $description['name']; > echo "<pre>"; > echo "$new_description"; > echo "</pre>"; > } > > } I haven't look through it long enough to find out about the characters, but try this: foreach($tableNews as $headline => $text){ echo "<br>"; echo $text['text']; echo "<pre>"; echo $text['user']['name']; echo "</pre>"; } -- Thanks! -Shawn http://www.spidean.com

« previous php.general (#314396) next »