BRADERY Posted December 7, 2010 Share Posted December 7, 2010 how can I make php read a file with ids in the format 23423423 32423423 23423454 56667777 and output each id to $id[]? Quote Link to comment https://forums.phpfreaks.com/topic/220965-php-read-file/ Share on other sites More sharing options...
trq Posted December 7, 2010 Share Posted December 7, 2010 file. Quote Link to comment https://forums.phpfreaks.com/topic/220965-php-read-file/#findComment-1144174 Share on other sites More sharing options...
Rifts Posted December 7, 2010 Share Posted December 7, 2010 http://www.tizag.com/phpT/fileread.php Quote Link to comment https://forums.phpfreaks.com/topic/220965-php-read-file/#findComment-1144176 Share on other sites More sharing options...
BRADERY Posted December 7, 2010 Author Share Posted December 7, 2010 took me awhile but I got it w00t <?php $file = "filename.txt"; $id = file($file); foreach($id as $ids){ echo $ids; } ?> Thanks Quote Link to comment https://forums.phpfreaks.com/topic/220965-php-read-file/#findComment-1144193 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.