I could be wrong, but I think you have an associative array called "$cart" where certain isbn numbers has a certain quantity.
$cart = array
(
"isbn983279875403" => '3',
"isbn98543435403" => '2',
"isbn2345275403" => '1',
"isbn348754434533" => '4'
);
In this example,
$cart['isbn983279875403'] = 3;
This means there are 3 books with the isbn number "983279875403."
I hope that's clear. Arrays are confusing to begin with, but after you get the hang of it, it's pretty easy. 🙂
Now the foreach statement loops through the entire array... and whatever statement is in that loop will execute until there is no more data in the array.
The forloop could look like this:
foreach($cart as $isbn => $qty)
{
echo 'I have ' . $qty . ' book(s) with isbn ' . $isbn;
}