Read Content from a .txt file

#4
[eluser]xwero[/eluser]
the easy way would be
Code:
$lines = file('/var/www/myproject/myfile.txt'); // gets file in array using new lines character
foreach($lines as $line)
{
   $temparr = explode(':'$line);
   ${$temparr[0]} = trim($temparr[1]);
}


Messages In This Thread
Read Content from a .txt file - by El Forum - 01-16-2008, 04:41 AM
Read Content from a .txt file - by El Forum - 01-16-2008, 04:47 AM
Read Content from a .txt file - by El Forum - 01-16-2008, 07:36 AM
Read Content from a .txt file - by El Forum - 01-16-2008, 07:53 AM
Read Content from a .txt file - by El Forum - 01-16-2008, 07:11 PM
Read Content from a .txt file - by El Forum - 01-16-2008, 07:46 PM
Read Content from a .txt file - by El Forum - 01-16-2008, 09:46 PM
Read Content from a .txt file - by El Forum - 01-16-2008, 10:17 PM
Read Content from a .txt file - by El Forum - 01-17-2008, 12:30 AM
Read Content from a .txt file - by El Forum - 01-17-2008, 02:02 AM
Read Content from a .txt file - by El Forum - 01-17-2008, 07:28 PM
Read Content from a .txt file - by El Forum - 01-17-2008, 08:44 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.