ninja_forms_implode_r

The Ninja Forms ninja forms implode r function.

Description

ninja_forms_implode_r( $glue, $pieces ); 

Parameters (2)

0. $glue
The glue.
1. $pieces
The pieces.

Usage

  1. if ( !function_exists( 'ninja_forms_implode_r' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/deprecated.php'; 
  3.  
  4. // The glue. 
  5. $glue = null; 
  6.  
  7. // The pieces. 
  8. $pieces = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_implode_r($glue, $pieces); 
  12.  

Defined (1)

The function is defined in the following location(s).

/deprecated/includes/deprecated.php  
  1. function ninja_forms_implode_r($glue, $pieces) { 
  2. $out = ''; 
  3. foreach ( $pieces as $piece ) { 
  4. if ( is_array ( $piece ) ) { 
  5. if ( $out == '' ) { 
  6. $out = ninja_forms_implode_r($glue, $piece); 
  7. } else { 
  8. $out .= ninja_forms_implode_r($glue, $piece); // recurse 
  9. }  
  10. } else { 
  11. if ( $out == '' ) { 
  12. $out .= $piece; 
  13. } else { 
  14. $out .= $glue.$piece; 
  15. return $out;