str_split

Convert a string to an array (needed for PHP4 compatibility).

Description

str_split( $string, (int) $split_length = 1 ); 

Parameters (2)

0. $string
The string.
1. $split_length — Optional. (int) => 1
The split length.

Usage

  1. if ( !function_exists( 'str_split' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/admin/parser.php'; 
  3.  
  4. // The string. 
  5. $string = null; 
  6.  
  7. // The split length. 
  8. $split_length = 1; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = str_split($string, $split_length); 
  12.  

Defined (1)

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

/includes/admin/parser.php  
  1. function str_split($string, $split_length = 1) { 
  2. $array = explode("\r\n", chunk_split($string, $split_length)); 
  3. array_pop($array); 
  4. return $array;