I have some array to go through foreach. Inside, I need to generate an array of quantity.
It still brings me back in both 0-5.
The output should look like this:
$a = array(['id' => 1,'quantity' => 5,'input' => 'one'],
['id' => 2,'quantity' => 4,'input' => 'two'] );
foreach ($a as $b) {
for ($x = 0; $x <= $b['quantity']; $x++) {
$count[$x] = $x;
}
dump($b['quantity']);
dump($count);
}
