Skip to the content Skip to the main menu
Abu Yasmeen

Jeremy Varnham

  • My Publications
  • ResearchGate
  • LinkedIn
  • Github
  • WordPress
  • Twitter

Jeremy Varnham

  • My Publications
  • ResearchGate
  • LinkedIn
  • Github
  • WordPress
  • Twitter

Trim array with wp_array_slice_assoc function

$array = array(0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd', 4 => 'e', 5 => 'f');
$keys = array(2,5);
print_r(wp_array_slice_assoc($array, $keys)); //  Array ( [2] => c [5] => f )

 

  • Post date
    27 December 2013
  • Posted by
    jeremy
  • Posted in PHP, Wordpress
  • Comments
    0
Previous post: Using get_weekstartend function Next post: jQuery Drag Drop – Resize to Fit Target

Leave a Reply Cancel reply

Theme by Anders Norén