Introduction to writing spiders and agents
Parsing data in tables
    In most cases you'll know what you're looking for, and it's in tables
NamePhoneZip
Donna(800) 555-132155423
Mark(976) 555-332355427
Tom(555) 555-119955429
  
# SET END-OF-ROW TAG TO KNOWN VALUE	
$data = str_replace("</TR>", "</tr>", $data);

# SPLIT TABLE ON END-OF-ROW TAGS
$table_array = explode("</tr>", $data);

$qty_rows = count($table_array);
for($row=0; $row<$qty_rows-1; $row++)
  {
  # SET END-OF-DATA CELL TAG TO KNOWN VALUE	
  $table_array[$row] = str_replace("</TD>", "</td>", $table_array[$row]);
  $table_array[$row] = str_replace("</TH>", "</td>", $table_array[$row]);
  $table_array[$row] = str_replace("</th>", "</td>", $table_array[$row]);

  # SPLIT DATA ON END-OF-DATA CELL TAGS
  $row_array = explode("</td>", $table_array[$row]);

  #CLEAN-UP AND DISPLAY PARSED TABLE DATA
  echo "Row=$row\n";
  for ($yy=0; $yy<count($row_array)-1; $yy++)
    {
    $row_array[$yy] = strip_tags($row_array[$yy]);
    $row_array[$yy] = trim($row_array[$yy]);
    echo "row_array=$row_array[$yy]\n";
    }
  }