View Single Post
  #3  
Old 08-13-2007, 11:48 PM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,165
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: How to Use Array's efficiently in PHP

Hi Guys,
Here i have two arrays
$a = array(0,2,3,4)
$b = array(2,4)

i want to get the new array which only have elements like array(0,3) which does not have the elements in $b

So in this case we have to use array_diff functions as like this

$newarray = array_diff($a,$b)

$newarray contains the elements as (0,3)
__________________
With,
J. Jeyaseelan

Everything Possible
Reply With Quote