Ho questo codice html. Sto usando Simple HTML Dom per analizzare i dati nel mio script php.come stampare le celle di una tabella con dom html semplice
<table>
<tr>
<td class="header">Name</td>
<td class="header">City</td>
</tr>
<tr>
<td class="text">Greg House</td>
<td class="text">Century City</td>
</tr>
<tr>
<td class="text">Dexter Morgan</td>
<td class="text">Miami</td>
</tr>
</table>
ho bisogno di ottenere il testo all'interno delle TDs in un array, ad esempio:
$ array [0] = array ('Greg House', 'Century City'); $ array [1] = array ('Dexter Morgan', 'Miami');
Ho provato diversi modi per ottenerlo, ma ho fallito in ognuno di loro. Qualcuno può darmi una mano?
Dovresti usare [DOM e Xpath] (http://stackoverflow.com/questions/2019422/regex-problem-in-php) – quantumSoup
ho per farlo usando Simple HTML Dom;) – andufo