From: Alper Oğu (alperliste@showtv.com.tr)
Date: Thu 21 Nov 2002 - 19:15:22 EET
Merhaba,
21.11.2002, 18:57, Devrim GÜNDÜZ wrote:
DG> Dosyanin basinda kac satir oldugu belli degil. Bu tarih de,
DG> ilgili satirin neresinde oldugu belli degil. Ama tarih
DG> kesinlikle sadece orada geciyor.
While bolumunde asagidaki gibi yapilabilir. 512'yi satirin maks.
boyu kabul ettim.
while (!feof($dosya1)) {
$satir=fgets($dosya1, 512);
$sutunmax=strlen($satir);
for ($sutun=0; $sutunmax; $sutun++)
$arama=substr($satir,$sutun,1);
if ($arama=="/") {
echo "tarih bulundu :)";
}
}
Yanliz bu cok yavas bir yontem herhalde. Her satirdaki harfleri de
tek tek tariyor. For'daki bolum yerine strpos(string, "/") veya
ereg("/", string) ile arama yapmak daha iyi olabilir.
-- Alper Oğuz alperliste@showtv.com.tr