Extraire le contenu de cellules HTML avec un preg_match_all ?
Salut @ tous,
J'ai le code HTML suivant:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| <tr>
<td>A Running Start Foundation, Until December 2009</td>
<td>East Hampton, NY</td>
</tr>
<tr>
<td>A Sanctuary Center</td>
<td>Sedalia, CO</td>
</tr>
<tr>
<td>
<div>A Second Chance Outreach Ministry, Inc.********</div>
</td>
<td>Milwaukee, WI</td>
</tr>
<tr>
<td>A Step Above Learning Center, Inc.,*Until December 2010NC</td>
<td>Fayetteville, NC</td>
</tr>
<tr>
<td>A Touch of Faith, Inc., Until December 2008</td>
<td>Dallas, TX</td>
</tr>
<tr>
<td>Abbey Lane Eagles Residents Association, Inc., Until December 2010</td>
<td>Winter Haven, FL</td>
</tr>
<tr>
<td>Abram Housing Corporation, Until June 2008</td>
<td>Oakland, CA</td>
</tr> |
Tout ce que je veux c'est recuperer pour chaque ligne (entre <tr> et </tr>), la premiere case (entre <td> et </td>) et la seconde case et ajouter son contenu a un tableau comme ceci:
$tableau[] = array('Organization' => $contenu1, 'Location' => $contenu2);
Comment y arriver ?
Merci
Stephane