public static function loop(array $array, $string, $betweenStrings = PHP_EOL)
    {
        $output = [];

        foreach ($array as $key => $value) {
            // Flatten the array with dots and parse it
            $output[] = static::parseString($string, array_map('addslashes', static::array_dot($value)));
        }

        return implode($betweenStrings, $output);
    }
public static function loop(array $array, $string, $betweenStrings = PHP_EOL)
    {
        $output = [];

        foreach ($array as $key => $value) {
            // Flatten the array with dots and parse it
            $output[] = static::parseString($string, array_map('addslashes', static::array_dot($value)));
        }

        return implode($betweenStrings, $output);
    }
public static function loop ( array $ array , $ string , $ betweenStrings = PHP_EOL ) { $ output = [ ] ; foreach ( $ array as $ key => $ value ) { // Flatten the array with dots and parse it $ output [ ] = static :: parseString ( $ string , array_map ( 'addslashes' , static :: array_dot ( $ value ) ) ) ; } return implode ( $ betweenStrings , $ output ) ; }
Loop through an array and prints for every element the string

@param array $array
@param $string
@param string $betweenStrings
@return string
Loop through an array and prints for every element the string