suresh64633 Posted September 1, 2009 Share Posted September 1, 2009 Hello Guys, Am importing CSV files which contain amount field and it working fine. If values are lilke 309, 139, 1, "EB", "83553.12","CAAXX", If my CSV contain amount fields like 309, 139, 1, "EB", "83,553.12", "CAAXX", Than it take to different values as 83 and 533.12. How to overcome this problem? Link to comment https://forums.phpfreaks.com/topic/172696-solved-csv-importing/ Share on other sites More sharing options...
ignace Posted September 1, 2009 Share Posted September 1, 2009 Is it possible to change the value-separator? Thus instead of , use ;? Otherwise you could use: $values = array(); preg_match('/\d+|"[A-Z-,-\.-0-9]+"/', $csvline, $values); print_r($values); Link to comment https://forums.phpfreaks.com/topic/172696-solved-csv-importing/#findComment-910294 Share on other sites More sharing options...
suresh64633 Posted September 1, 2009 Author Share Posted September 1, 2009 Thanks for your fast replay. And it working great. Link to comment https://forums.phpfreaks.com/topic/172696-solved-csv-importing/#findComment-910315 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.