If there's some sort of pattern in the HTML code (there usually is), you can use something like [man]preg_match_all/man to retrieve all of the values into an array, and then it's simply a matter of looping through the array and inserting them into your database.
If you want help with this, can you post a sample of what the HTML looks like, and explain what you want to extract from it?