Re: hi all
> Im printing out a list of arrays into screen, however i only want items
that
> are unique to be printed... so i dont get double items to be printed...
how
> do i go about that?
array_unique() - Removes duplicate values from an array
It's in the PHP manual under "Array Functions".
It returns the new array, so you'd just have to do something like this:
<?php
$myArray = array(
"big",
"badda",
"boom"
);
$tempArray = array_unique( $myArray );
print_r( $tempArray );
?>
Hope this helps :)
- Will Dowling
|