PHP Array Filter by array
With php do you want to filter array by other array…. like this. $my_array = array(“foo” => 1, “hello” => “world”); $allowed = array(“foo”, “bar”); And you want output like… $my_array = array(“foo” => 1); Then your solution snippet is ….. var_dump(array_intersect_key($my_array, array_flip($allowed))); array(1) { ["foo"]=> int(1) } 1 person likes this [...]
Read MoreHow to write a good Bug Report ?
Why good Bug report? If your bug report is effective, chances are higher that it will get fixed. So fixing a bug depends on how effectively you report it. Reporting a bug is nothing but a skill and I will tell you how to achieve this skill. “The point of writing problem report(bug report) is [...]
Read More