>$ID_arr[] = explode(',', $pictures); # make db data into array
>
>This is the string:
>
>15,16,17,18,19
>
>why does it echo as Array?

Because you have a "two-dimensional" array:

ID_arr = array(
            array(15, 16, 17, 18, 19)
         );

The reason you have a 2-D array is that you have [] in the assignment:

$ID_arr[] = <<<< function that builds an array >>>>>>>;

So the right-hand-side of = turns into an Array, and *then* you use [] to
force ID_arr to be an Array, and you stuff the one Array into the first open
position in the ID_arr Array.

Get rid of the [] and everything will be beautiful.

Any time you try to print something and get Array, it's because whatever you
have done has caused that thing to be an Array itself.  If you didn't want
it to be an Array, figure out where/how you got an "extra" layer of
Array-ness in your code.

-- 
Like Music?  http://l-i-e.com/artists.htm


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

Reply via email to