edi Posted July 26, 2010 Report Share Posted July 26, 2010 faila name.dat glabajas sekojosais //id|lauks|lauks|lauks| 1|viens|divi|tris| 2|viens|divi|tris| 3|viens|divi|tris| 4|viens|divi|tris| 5|viens|divi|tris| 6|viens|divi|tris| 7|viens|divi|tris| 8|viens|divi|tris| 9|viens|divi|tris| 10|viens|divi|tris| ka var izvadit datus piem. tikai no id 5 ? Quote Link to comment Share on other sites More sharing options...
briedis Posted July 26, 2010 Report Share Posted July 26, 2010 Nu, kur ir problēma? Ielasi faila saturu ar file - iegūsti masīvu, kur katrs elements ir rindiņa Ej cauri visiem ierakstiem, izmanto explode, skaties, kad būs tas vajadzīgais elements. Pietiek ar funkcijām/val.kontr.: file(), explode(), foreach, if... Tiešām ceru, ka neviens neuzrakstīs visu priekšā, lai tas edi tak kaut ko beidzot iemācās... Quote Link to comment Share on other sites More sharing options...
marcis Posted July 26, 2010 Report Share Posted July 26, 2010 fopen() + fseek() + fgetcsv() Piemēri tur netrūkst. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.