This may be a little confusing if the reader is not familiar with this code.  Could you add a comment here?  Something like:

  // Create blank records so $data is the same length as $assets. This ensures the old assets are removed from the DB if they were removed from the input form