jmcc Posted July 9, 2010 Share Posted July 9, 2010 would this work? $num = explode(",",file($file); foreach($num as $msisdn){ echo $msisdn } Thanks Jay Link to comment https://forums.phpfreaks.com/topic/207297-explode-function/ Share on other sites More sharing options...
Mchl Posted July 9, 2010 Share Posted July 9, 2010 No. It will result in syntax error. Link to comment https://forums.phpfreaks.com/topic/207297-explode-function/#findComment-1083829 Share on other sites More sharing options...
jmcc Posted July 9, 2010 Author Share Posted July 9, 2010 Saw I left out a ")" How do I read csv's from a file? $num = explode(",",file($file)); foreach($num as $msisdn){ echo $msisdn } Thanks Jay Link to comment https://forums.phpfreaks.com/topic/207297-explode-function/#findComment-1083831 Share on other sites More sharing options...
Mchl Posted July 9, 2010 Share Posted July 9, 2010 Saw I left out a ")" and also a ; How do I read csv's from a file? You use fgetcsv Link to comment https://forums.phpfreaks.com/topic/207297-explode-function/#findComment-1083832 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.