Blitz Posted September 6, 2005 Report Share Posted September 6, 2005 Man ir sads loops: foreach ($masivs as $value) { $row=ibase_fetch_row($result); if ($value==$row[0]){continue; } elseif ($value>$row[0]) {echo "$value<br>"; continue; } else { $row[0]=ibase_fetch_row($result); } } Man vajag lai vins panem nakamo rindu no db saglabajot to pasu masiva elementu $value. Tur kur ir $row[0]=ibase_fetch_row($result) vinam japarlec uz IF, lai parbauditu to pasu $value bet ar nakamo rindu. Ja lieto continue tad vins parlec uz foreach sakumu un panme jau nakamo masiva elementu.... Link to comment Share on other sites More sharing options...
v3rb0 Posted September 6, 2005 Report Share Posted September 6, 2005 (edited) driizak gan taisi taa lai paarbaude buutu pret ieprieksejo rindu, kuru vari saglabaat iepriekseejaa iteraacijaa kaadaa mainiigajaa. vai visu vispirms sakraamee ieks masiiva un tad skaties naakoso rindu. bet vispaar iisti nesapratu jautajumu :) Edited September 6, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
Delfins Posted September 6, 2005 Report Share Posted September 6, 2005 neredzu jēgu šitajiem LOOP-iem.. Tev jātaisa otradāk.. while ( $row = .. ) { foreach ( $masivs ... ) { } } Link to comment Share on other sites More sharing options...
Recommended Posts