Re: Unanticipated characters returned from multidimensional array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux