Edit: Got it sorted for the most part. I was way off, heh.
I've been working on this for a while, and I've gotten close, just not close enough. So far it'll delete one line but not multiple lines. Basically I have a listbox:
In a txt file I have:Code:<select name='merchants[]' multiple="multiple">
<option value="8334">8334 - Playful Plush Toys</option>
<option value="4742">4742 - Nature Hills Nursery</option>
</select>
And I'm trying to open that file and delete any lines that match what's been selected in the listbox. Here's my, probably horribly, code.Quote:
8334,Playful Plush Toys
4742,Nature Hills Nursery
Again, it works with one line, but not multiple. Selecting multiple lines only removes the first line, and rewrites the file with an initial comma delimited blank line, followed by the second entry.PHP Code:
// horrible code removed