Posted by Jerry Stuckle on 08/24/07 01:44
Steve wrote:
> "Kyote" <kyote_love@nospamhotmail.com> wrote in message
> news:96csc3tplg3md00t969hu45f74dt6bb80u@4ax.com...
> |
> | >$books = array();
> | >foreach ($files as $value) {
> | > $c = substr($value,0,1);
> | > if (!is_array($books[$c]))
> | > $books[$c] = array();
> | > $books[$c][] = $value;
> | >}
> |
> | Thank you very much Jerry. This seems to work exactly as I need.
>
> jerry's got it...but just a tid-bit of fun...
>
> a string is an array of characters. so, $c could easily be set by:
>
> $c = $value[0];
>
>
That's true - just trying to keep it close to what he had. Didn't want
to cornfuse him too much :-)
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|