Scusa ti posto il tutto codice
Codice PHP:
<?php $search = $_REQUEST["search1"];$search1 = $_REQUEST["search2"]; $testo = $search; $w = explode("|", $search); $n_w = count($w);for ($x=0; $x<=$n_w; $x++){ $testo = str_replace($w[$x], "<b>".$w[$x]."</b>", $testo);}$matches = array( );$fp = fopen("text.txt", "r");$cols = 1; while (!feof($fp)) { $line = fgets($fp, 4096);if (strpos($line, $search) !== false && strpos($line, $search1) !== false){ $matches [ ] = "$line <br />"; }} echo "<center><h2> Risultati Richiesta</h2><td bgcolor='#FFFF00'>$testo e $search1</center><table border=\"5\" allign =\"center\"cellpadding=\"10\">"; for ($i=0; $i < count($matches); $i++) { echo "<tr>"; for ($c=0; $c<$cols; $c++) { echo str_ireplace($search,'<span style="color: violet;">'.$search.'</span>', "<td><font face='palatino linotype'> $matches[$i]</td>"); } echo "</tr>"; } echo "</table>"; ?>