Jump to content

stringsplit + array


Recommended Posts

i have a text file which has the folllowing:

info

name=cap0

age=15

endinfo

info

name=secondname

age=age

endinfo

How would i stringsplit them and get the values of name/age in an array? i can only do the first one, but just getting the name.

$f = FileRead("ttx.txt",FileGetSize("ttx.txt"))
$a = StringSplit($f,@CRLF)
$s = StringSplit($a[3],"=")
msgbox(0,'',$s[2])

that's only for "name=cap0", how would i do it with the other name/age? i'm kind of confused here.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...