You appear to be a bot. Output may be restricted
Description
Return all the unkeyed items as an unkeyed array
Usage
$mixed = bw_array_get_unkeyed( $array, $split );
Parameters
- $array
- ( mixed ) optional – array from which to extract the unkeyed values
- $split
- ( bool ) optional default: 1 – whether or not to break down the values further
Returns
mixed array of results e.g. $atts = array( "san ta" , "claus" , "zip" => "a" , "diddy" => "do" , "dah" => "day" , "the" , "mo,vie" ); $unkeyed = array( "san", "ta", "claus", "the", "mo", "vie" );Source
File name: oik/includes/bobbcomp.phpLines:
1 to 19 of 19
function bw_array_get_unkeyed( $array=null, $split=true ) { $unkeyed = array(); if ( is_array( $array) && count( $array ) ) { foreach ( $array as $key => $value ) { if ( is_numeric( $key ) ) { if ( $split ) { $value = str_replace( "," , " ", $value ); $values = explode( " ", $value ); foreach ( $values as $valu ) { $unkeyed[] = $valu; } } else { $unkeyed[] = $value ; } } } } return( $unkeyed ); }View on GitHub View on Trac