i want to use implode function for exploded veriables.
i am using this function but i want to use in my class.
public function array_implode($arrays, &$target = array()) {
foreach ($arrays as $item) {
if (is_array($item)) {
$this->array_implode($item, $target);
} else {
$target[] = $item;
}
}
return $target;
}
using:
$return = implode('|', $this->array_implode($sonuc2));
this error
Warning: Invalid argument supplied for foreach() in C:\AppServ\www\disavurv2\classes\arkadas.class.php on line 7
Function's line 7
foreach ($arrays as $item) {
Help me