Skip to content
Advertisement

I want to delete data in xml but it can’t

When I try to delete, I can’t delete it properly. It will stuck at number 2

JavaScript

Advertisement

Answer

your $i variable is constantly 2, the i++ should probably be inside the loop?

also, if your condition is never met, $index is 0 and its use will likely lead to an error.

The code will act only on the first match, whats ok, if that is what you expect.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement