Peuplarchie Posted July 16, 2008 Share Posted July 16, 2008 Good day to you all, Here is a piece of code from my login script. $data=array("user1"=>array("url"=>"Index/admin-index.php","password"=>"pass1"), "user2"=>array("url"=>"file2.php","password"=>"pass2")); As you can see the array is not a generated array, in other word, the script should read a txt file, each line would have, a password, username and a url. like : Jack=>Daniel=>Director/index.php Angolina=>Joli=>Pretty/index.php Mike=>Lee=>User/index.php Thanks ! Franck Link to comment https://forums.phpfreaks.com/topic/115090-make-array-with-txt-file-content/ Share on other sites More sharing options...
rhodesa Posted July 16, 2008 Share Posted July 16, 2008 if you are looking to make an easily parsable text format, i would either use CSV or INI. INI => http://us2.php.net/manual/en/function.parse-ini-file.php CSV => http://us2.php.net/manual/en/function.fgetcsv.php Link to comment https://forums.phpfreaks.com/topic/115090-make-array-with-txt-file-content/#findComment-591859 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.