1 2 3 4 5 6 7 8 9 10 11 12 13 14
| <?php
// ici, la connexion à la base de données
$table = "_a_list";
$pattern = "#([0-9]+)\ \:\ ([a-zA-Z\'\ \.\-Ééèî\s]+) ([0-9]+)\-([0-9]+|\?)([a-z\<\ \/\>]+)#";
$subject = mysql_query("SELECT ID, notes FROM $table WHERE ID < '101' AND notes != ''") or die ( "select error " .mysql_error () );
$matches = "";
if ( mysql_num_rows( $subject ) > 0) {
while ($row =mysql_fetch_array ($subject ) ) {
$flashstr .= $row ["ID" ]." : ".$row ["notes" ]."<br />";
preg_match_all ($pattern, $flashstr, $matches, 0, 0) ;
}
print_r ($matches);
}
?> |