Skip to main content
added 6 characters in body
Source Link
Hanky Panky
  • 46.9k
  • 9
  • 76
  • 95

You don't only need to call that function you need to use the returned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

There are some functions that operate on the original variable and hence you dont need to pick up their ret val for example sort()sort() but array_uniquearray_unique() is not one of them. Always refer to http://www.php.net/functionName to find out

You don't only need to call that function you need to use the returned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

There are some functions that operate on the original variable and hence you dont need to pick up their ret val for example sort() but array_unique is not one of them. Always refer to http://www.php.net/functionName to find out

You don't only need to call that function you need to use the returned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

There are some functions that operate on the original variable and hence you dont need to pick up their ret val for example sort() but array_unique() is not one of them. Always refer to http://www.php.net/functionName to find out

added 231 characters in body
Source Link
Hanky Panky
  • 46.9k
  • 9
  • 76
  • 95

You don't only need to call that function you need to use the returned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

There are some functions that operate on the original variable and hence you dont need to pick up their ret val for example sort() but array_unique is not one of them. Always refer to http://www.php.net/functionName to find out

You don't only need to call that function you need to use the returned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

You don't only need to call that function you need to use the returned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

There are some functions that operate on the original variable and hence you dont need to pick up their ret val for example sort() but array_unique is not one of them. Always refer to http://www.php.net/functionName to find out

added 5 characters in body
Source Link
Script47
  • 14.6k
  • 4
  • 49
  • 69

You dontdon't only need to call that function you need to use the return valreturned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

You dont only need to call that function you need to use the return val as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

You don't only need to call that function you need to use the returned value as well. Do

$tmp=array_unique($tmp);

Just calling that function and not picking up the returned value does no good.

Source Link
Hanky Panky
  • 46.9k
  • 9
  • 76
  • 95
Loading