My switch case allows to find the tables having two specific values. Here is what I would like to do:
foreach ($array as $key => $value) {
switch($value) {
case "C":
case "D":
//Take all key from "C" until I come across a second value "C" or "D"
}
}
Here is an example :
$array =
(
[53] => q
[61] => f
[74] => s
[87] => C
[19] => D
[101] => e
[22] => C
[13] => h
)
Result : "87 19 101 "