Keep testing, like inserting another row. Then you'll get something like:
Array ( [0] => 24 [1] => 25)
as an example.
What I said was that you'll get a new index for each row value inserted. They are not going to be on the same index value in my example.
Why do you want them all in one index value? If you want them all in the same variable/index value then you'll have to separate them by a delimiter (like a comma) so you'll know one from another.
It's still easier to keep in separate index values and if you still want them all together like in a string then you could simply do this at the end:
$list_of_ids = implode(',', $_SESSION['graphics']);
echo $list_of_ids; // Displays: 24,25 as an example
🙂