Answer the question
In order to leave comments, you need to log in
Two arrays, make up an integer. How?
Hello guys, there are two arrays, an example
[0] => array ( <- это сезоны
[0] => 1
[1] => 2
[2] => 3
)
[0] => array ( <- это серии
[0] => 1
[1] => 2
[2] => 3
)
[0] => array (
[0] => array (
[id-сезона] => 1
[id-серии] => 1
)
[1] => array (
[id-сезона] => 2
[id-серии] => 2
)
[2] => array (
[id-сезона] => 3
[id-серии] => 3
)
)
Answer the question
In order to leave comments, you need to log in
more or less like this:
<?php
$array1 = array(); // <- это сезоны
$array2 = array(); // <- это серии
$result = array();
foreach($array1 as $key => $value) {
$result[$key] = array(
'id-сезона' => $array1[$key],
'id-серии' => $array2[$key],
);
}
echo '<pre>';
print_r($result);
echo '</pre>';
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question