includes/class-tste-funcs.php
/* --------------------------------------------------
		 *
		 *  Function: array_convert
		 *  @return A string by flattening an array
		 *
		 * -------------------------------------------------- */
array_convert
@return A string by flattening an array
array_convert @return A string by flattening an array
public function array_convert($target, $del = ', ') {
			if(empty($target)) return;
			if (is_array($target)) {
				$array = $target;
				$string = '';
				$numItems = count($array);
				$i = 0;
				foreach ($array as $a) {
					$string .= $a;
					if (++$i !== $numItems) $string .= $del;
				}
				return $string;
			} elseif (is_string($target) && strpos($target, $del)) {
				$string = $target;
				$array = array();
				$array = explode(" ", $string);
				return $array;
			} else {
				return __('No array nor string passed - an error on function "array_convert()"', 'tste');
			}
		}
public function array_convert ( $ target , $ del = ', ' ) { if ( empty ( $ target ) ) return ; if ( is_array ( $ target ) ) { $ array = $ target ; $ string = '' ; $ numItems = count ( $ array ) ; $ i = 0 ; foreach ( $ array as $ a ) { $ string .= $ a ; if ( ++ $ i !== $ numItems ) $ string .= $ del ; } return $ string ; } elseif ( is_string ( $ target ) && strpos ( $ target , $ del ) ) { $ string = $ target ; $ array = array ( ) ; $ array = explode ( " " , $ string ) ; return $ array ; } else { return __ ( 'No array nor string passed - an error on function "array_convert()"' , 'tste' ) ; } }
Function: array_convert
  @return A string by flattening an array
Function : array_convert @return A string by flattening an array