Web Analytics Made Easy -
StatCounter opposite to array_diff? - CodingForum

Announcement

Collapse
No announcement yet.

opposite to array_diff?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • opposite to array_diff?

    I.e. a function that returns an array3 containing all elements in both aray1 and array2. Is there one? If so what is it as I cant find it anywhere! Cheers.

    Oh, also, how do you find the number of elements in an array?
    Last edited by heaps21; Feb 26, 2004, 07:23 PM.

  • #2
    PHP Code:
    <?
    $array3 
    $array1 $array2 ;
    ?>
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

    Comment


    • #3
      I think you're looking for array_intersect() and count().
      De gustibus non est disputandum.

      Comment


      • #4
        ah, array_intersect... thats the one! Cheers

        Comment


        • #5
          DOH !
          resistance is...

          MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

          Comment

          Working...
          X