Hello,
There is a problem with this cycle, can you help
$array = array();
$array = array(1,2,3,4,5,6);
foreach ($array AS $sira){
$birinci['birinci'][] = "deneme";
$ikinci['ikinci'][] = "deneme2";
}
$yeni_dizi = array_merge($birinci, $ikinci);
foreach ($yeni_dizi AS $dizi){
foreach ($dizi AS $key => $value){
if($key == "birinci"){
echo $value."<br>";
}
if($key == "ikinci"){
echo $value."<br>";
}
}
}
print_r () output
Array
(
[birinci] => Array
(
[0] => deneme
[1] => deneme
[2] => deneme
[3] => deneme
[4] => deneme
[5] => deneme
)
[ikinci] => Array
(
[0] => deneme2
[1] => deneme2
[2] => deneme2
[3] => deneme2
[4] => deneme2
[5] => deneme2
)
)
foreach output
deneme
deneme
deneme2
deneme2