Onestamente non l'ho testato, ma dovrebbe andare.Codice PHP:
function getRow($file_name, $to_find) {
$file = file($file_name);
foreach($file as $line => $row) {
if(strpos($row, $to_find) === true) return $line;
}
return -1;
}
![]()
Onestamente non l'ho testato, ma dovrebbe andare.Codice PHP:
function getRow($file_name, $to_find) {
$file = file($file_name);
foreach($file as $line => $row) {
if(strpos($row, $to_find) === true) return $line;
}
return -1;
}
![]()
La disumanità del computer sta nel fatto che, una volta programmato e messo in funzione, si comporta in maniera perfettamente onesta.
Isaac Asimov