The callback function in array_filter() only passes in the array's values, not the keys.
If I have:
$my_array = array("foo" => 1, "hello" => "world");
$allowed = array("foo", "bar");
What's the best way to delete all keys in $my_…
I am sure that this is super easy and built-in function in PHP, but I have yet not seen it.
Here's what I am doing for the moment:
foreach($array as $key => $value) {
echo $key; // Would output "subkey" in …
i am trying to push multiple arrays into 1 big array, resulting in a 2 lvl array.
I got this set of arrays for example:
Array
(
[cod] => ddd
[denum] => ffffffffffffffff
[descr] => ggggggg
[cant] => 3
)
Array
(
[cod] => fff
[denum] =&…