banter Posted May 6, 2009 Share Posted May 6, 2009 Hi, does anyone know how best to convert data from tables in html to be put (eventually) in a database? I have to rework a website consisting fully of html. It is a holiday house website. So there are about 400 houses, but they are structured pretty neat in html, with logical .html follow-up names. But I don't know where to start to get the data/facilities of those houses into excel or a database, cause I want to redesign the website with a mysql-php database system, because they are getting bigger and everything html is way too much work for them when someone makes a reservation. Any tips? I am a beginner at php, allthough I have read the PhP5 book and know how it works. Quote Link to comment https://forums.phpfreaks.com/topic/157116-convert-html-data-to-excel-php-mysql/ Share on other sites More sharing options...
Axeia Posted May 6, 2009 Share Posted May 6, 2009 Take a look at the PHP DOM , and in particular the loadhtmlfile function. You could build an array with files and write a script to extract the contents (Keep the max execution time in mind and don't try to do it all at once, by default that's 30 seconds). If you plan on using xpath to get to a certain node, firebug has a very nice "copy xpath" functionality which could ease the job. Quote Link to comment https://forums.phpfreaks.com/topic/157116-convert-html-data-to-excel-php-mysql/#findComment-827787 Share on other sites More sharing options...
banter Posted May 7, 2009 Author Share Posted May 7, 2009 Thanks Axeia, This function will help me out, I was looking for something like this! Quote Link to comment https://forums.phpfreaks.com/topic/157116-convert-html-data-to-excel-php-mysql/#findComment-828291 Share on other sites More sharing options...
neogemima Posted May 9, 2009 Share Posted May 9, 2009 flag topic to complete for us then. Quote Link to comment https://forums.phpfreaks.com/topic/157116-convert-html-data-to-excel-php-mysql/#findComment-830114 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.