Deleting item from lop
-
Lets say i have a loop for books
Array ( [0] => Array ( [title] => book 1 [author] => author 1 ) [1] => Array ( [title] => book 2 [author] => author 2 ) [2] => Array ( [title] => book 3 [author] => author 3 ) [3] => Array ( [title] => book 4 [author] => author 4 ) )
Now if i delete books[2] the array becomes
Array ( [0] => Array ( [title] => book 1 [author] => author 1 ) [1] => Array ( [title] => book 2 [author] => author 2 ) [3] => Array ( [title] => book 4 [author] => author 4 ) )
books[3] stays books[3], i assumed it would become books[2]
Is this how it’s supposed to be?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Deleting item from lop’ is closed to new replies.