You appear to be a bot. Output may be restricted
Description
Select the parts of the array that will be displayedWe have to take into account the table heading when necessary ( ie. when uo=table ). This processing is performed before any shortcode expansion of the fields in the array.
Usage
$array = bw_csv_content_array_select( $content_array, $start, $end, $atts );
Parameters
- $content_array
- ( array ) required – the complete array
- $start
- ( integer ) required – the start index – starts from 0 ?
- $end
- ( integer ) required – the end index
- $atts
- ( array ) required – shortcode parameters
Returns
array the selected rows from the arraySource
File name: oik-bob-bing-wide/shortcodes/oik-csv.phpLines:
1 to 16 of 16
function bw_csv_content_array_select( $content_array, $start, $end, $atts ) { //bw_trace2(); $select_array = array(); if ( $atts['uo'] == "table" ) { $heading = array_shift( $content_array ); } //bw_trace2( $select_array, "select_array", false ); //bw_trace2( $content_array, "content_array", false ); $select_array = array_slice( $content_array, $start, 1+ $end-$start ); if ( $atts['uo'] == "table" ) { array_unshift( $select_array, $heading ); } //bw_trace2( $select_array, "select_array ret", false ); return( $select_array ); }View on GitHub