$keys = file($KeysFile);
foreach($keys as $aKeys){
$Keys = explode(' ', $aKeys);
$Info[] = array($Keys[0], trim($Keys[1]));
}
I have a text file in the format
id securitykey
id securitykey
id securitykey
id securitykey
No blank space in between.. there is one set of id and security key on each line.. I need to be able to split the id and security key so I can have each in a variable of its own, and then put the id and security key in another array so I could call it like this
int i = 0;
Info[i][0]
and that would output the id and
int i = 0;
Info[i][1]
would output the securitykey..
I just need to be pointed in the right direction, Im pretty new to java, and coming from php I want to convert alot of my projects made in php to java applications with GUIs
First of all read data line by line : Read file line by line
Then you need to
split(in phpexplode) the line (string) : Split a string using String.split()And after that you can use it as you need it.