Jason Reposa

Archive for

January 2012

Jason Reposa

Find a better bank on MyBankTracker.com

Twitter
Jason Reposa's profile »

Archive

2012 (2)
February (1)
January (1)
2011 (5)
October (2)
July (2)
June (1)
2010 (7)
September (1)
August (1)
July (2)
January (3)
2009 (4)
September (1)
August (1)
May (2)
Subscribe via RSS
January 19, 2012

PHP: Preserve Keys in array_splice

  • Edit
  • Delete
  • Tags
  • Autopost

array_splice is a wonderful little function. Unfortunately it doesn't preserve the keys if they're numeric. I've tried many combinations of array_shift, array_slice and even array_reverse and array_pop. Here's my solution that preserves numeric keys.

Tweet
  • 0 responses
  • Like
  • Comment