Hello,
The code below works fine
I want to add an element to the switch array and again I want to separate the element I added in the for loop
AND
I want the values with the previous minus icon to continue processing
The item I added I want to use in a for loop operation with a variable
Sample:
“18x-08”
“18x-20|13x-16|7x-12|3x-08” as
So what is this?
-xx are products to search for
18,13,7,3 these are the floors where the board is located
I will use it when creating a document showing which product will be used on which floor.
I will be glad if you help
switch($bloktaki_pano_sayisi){
case $bloktaki_pano_sayisi == 2 : $hedefsecenek = array(
"-08"); break;
case $bloktaki_pano_sayisi == 3 : $hedefsecenek = array(
"-08|-12"); break;
case $bloktaki_pano_sayisi == 4 : $hedefsecenek = array(
"-08|-12|-16"); break;
case $bloktaki_pano_sayisi == 5 : $hedefsecenek = array(
"-08|-12|-16|-20"); break;
}
for ($vi = 0; $vi < count($hedefsecenek); $vi++) {
$hsecs = explode("|", $hedefsecenek[$vi]);
$hsecsay = count($hsecs);
// I want to protect the keys when the code operates according to the key
// Part of code working with sample key
if ($hsecsay == 4){
$var4kaskad0 = array_search($hsecs[0], $kaskadarray);
$var4kaskad1 = array_search($hsecs[1], $kaskadarray);
$var4kaskad2 = array_search($hsecs[2], $kaskadarray);
$var4kaskad3 = array_search($hsecs[3], $kaskadarray);
}
}