Re: [PHP] difference between indexed and associative arrays?

[email protected] (Kevin Waterson)
Newsgroups php.general
Message-ID <CAJSapQ3zxQPGtkg-h1viY2X-KkGV1RiJbi+LZky44_FJ76vDeg@mail.gmail.com>
<?php
        $a1 = array( 'one'=>'koala', 'two'=>'dingo', 'three'=>'kangaroo',
'four'=>'kookaburra', 'sixty'=>'wallaby' );
        $a2= array( 'koala', 'gecko', 'bilbi', 'crocodile', 'wallaby' );

        $diff = array_diff( $a1, $a2 );

        print_r( $diff );


On Wed, Apr 5, 2017 at 7:54 AM, Jeffry Killen <[email protected]> wrote:

> Is there a function that will produce the difference between indexed and
> associative arrays, without actually testing for string or integer indices?
>
> (Although I realize that arrays can be mixed string and integer indeces.)
>
> Thank you for time and attention.
> JK
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.