public function tostr(...$strings)
    {
        $new_string = '';
        foreach ($strings as $temp) {
            switch (gettype($temp)) {
                case "array":
                    $it = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($temp));
                    foreach($it as $v) {
                        $temp_str .= ' ' . $this->tostr($v);
                    }
                    break;
                default:
                    $temp_str = (string)$temp;
                    break;
            }
            $new_string .= $temp_str;
        }
        return trim($new_string);
    }
public function tostr(...$strings)
    {
        $new_string = '';
        foreach ($strings as $temp) {
            switch (gettype($temp)) {
                case "array":
                    $it = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($temp));
                    foreach($it as $v) {
                        $temp_str .= ' ' . $this->tostr($v);
                    }
                    break;
                default:
                    $temp_str = (string)$temp;
                    break;
            }
            $new_string .= $temp_str;
        }
        return trim($new_string);
    }
public function tostr ( ... $ strings ) { $ new_string = '' ; foreach ( $ strings as $ temp ) { switch ( gettype ( $ temp ) ) { case "array" : $ it = new \ RecursiveIteratorIterator ( new \ RecursiveArrayIterator ( $ temp ) ) ; foreach ( $ it as $ v ) { $ temp_str .= ' ' . $ this -> tostr ( $ v ) ; } break ; default : $ temp_str = ( string ) $ temp ; break ; } $ new_string .= $ temp_str ; } return trim ( $ new_string ) ; }
Take n arguments and combine them into a single
string and return that string
@param string $strings
@param ... $strings
@return string
Take n arguments and combine them into a single string and return that string