![]() |
Arrays and keys
How can I take an array and remove all elements of the array that have numeric keys?
Example: given an array $a['0'], $a['something'], $a['another1'], how can I remove $a['0']? I'm not talking about emptying the value but unset'ing that entire element. |
couple of ways off the top of my head
foreach ($a as $key => $var) { if (is_numeric($key)) { unset($a["$key"]); } } |
Thanks :)
|
All times are GMT. The time now is 04:30 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|