wouldn't this do it??

foreach($myarray as $key => $subarray) {
        $myarray[$key] = $myarray[$key]['Industry'];
}

On Aug 4, 2:32 pm, Tilen Majerle <[email protected]> wrote:
> $new = array();
> foreach ($old as $tmp)
> {
>    $new[] = $tmp['Imdustry'];
>
> }
>
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/8/4 spongs <[email protected]>
>
>
>
> > Can anybody help, similar to the above...
>
> > Need a quick way of turning this:
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [Industry] => Array
> >                (
> >                    [id] => 1
> >                    [industry] => Basic Materials
> >                    [ShowInLists] => 1
> >                )
>
> >        )
>
> >    [1] => Array
> >        (
> >            [Industry] => Array
> >                (
> >                    [id] => 2
> >                    [industry] => Consumer Goods & Services
> >                    [ShowInLists] => 1
> >                )
>
> >        )...
>
> > into this:
>
> > Array
> > (
> >    [0] => Array
> >        (
> >            [id] => 1
> >            [industry] => Basic Materials
> >            [ShowInLists] => 1
> >        )
>
> >    [1] => Array
> >        (
> >            [id] => 2
> >            [industry] => Consumer Goods & Services
> >            [ShowInLists] => 1
> >        )
>
> >    [2] => Array
> >        (
> >            [id] => 3
> >            [industry] => Energy & Utilities
> >            [ShowInLists] => 1
> >        )...
>
> > Many thanks for any assistance.
>
> > --
> > View this message in context:
> >http://cakephp.1045679.n5.nabble.com/Formatting-Arrays-tp1289583p4666...
> > Sent from the CakePHP mailing list archive at Nabble.com.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group
> > athttp://groups.google.com/group/cake-php- Hide quoted text -
>
> - Show quoted text -

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to