fopen - for opening the file get the string. explode it with ":" obtain the aray. use data for insert...
hth, toto ----- Original Message ----- From: "egacatorce" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Wednesday, November 16, 2005 11:18 AM Subject: [php_mysql] file data parsing in PHP Good day, guys!!! Could someone show me how to parse data in a text file using PHP and store the data in variables and MySQL? We have text files that contain information that looks something like this: EXAMPLE : Elephant OBJECT : Animal LOCATION : South Africa LOCATION : America EXAMPLE : Water Lily OBJECT : Plant LOCATION : Manila EXAMPLE : Panda OBJECT : Animal LOCATION : China . and so on. How can I manipulate the data inside a file? The data should be stored in a MySQL tables considering the relationship of every data element. I have not done it before and I hope someone would teach me how to do it. Thank you in advance. -Ega The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning. Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/CefplB/TM --------------------------------------------------------------------~-> The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php_mysql/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
