SHARE
TWEET

Untitled

a guest Jun 6th, 2017 143 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.         function rsnum($c, $index = 1) {
  3.             foreach($c as $k => $v)
  4.                 if(preg_match("/^\d+$/", $k) && $k == $index) unset($c[$k]);
  5.                     return $c;
  6.         }
  7.        
  8.         echo"<pre>\r";
  9.         print_r(rsnum(array(
  10.             0 => "v0",
  11.             1 => "v1", #vai remover esse index.
  12.             2 => "v2",
  13.             "v0" => 0,
  14.             "v1" => 1
  15.         )))
  16. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top