Jump to content
php.lv forumi

explode


edi

Recommended Posts

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 ?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...