Php Preg_match_all
I need a php function that does a preg_match_all against http://listings.ebay.com and produces an array that has:
parent category name
sub category name
category code
For example:
20081:”Antiques”:;
37903:”>Antiques”:”Antiquities”;
4707:”Antiques”:”Architectural & Garden”;
20082:”Antiques”:”Asian Antiques”;
My goal is to be able to have a list of categories and category codes for ebay, and be able to update that list on a regular basis.
The completed code should be able to write a .txt file, that has the array as described above.
Additionally, a php program should be able to open the file, and build a select list from the stored text that will look as follows:
<option class=’catlist’ value=’20081′>Antiques</option>
<option class=’catlist’ value=’37903′>Antiques: Antiquities</option>
<option class=’catlist’ value=’4707′>Antiques: Architectural & Garden</option>
<option class=’catlist’ value=’20082′>Antiques: Asian Antiques</option>
<option class=’catlist’ value=’2195′>Antiques: Books & Manuscripts</option>


