Meeker Posted December 8, 2008 Share Posted December 8, 2008 Hi, I want have product price info displayed on many htm files. I want to have a centralised way of updating these prices via php. My idea is to have all the prices stored in one data file. A small php snippet of code will find a variable name in the data file and then call the corresponding value from it. I have done some research and am struggling to find a solution. I want to be able to call the values through by a name not by a line number. Any help much appreciated. Cheers, Meeker Link to comment https://forums.phpfreaks.com/topic/136061-reading-prices-info-from-a-file/ Share on other sites More sharing options...
Mchl Posted December 8, 2008 Share Posted December 8, 2008 You might save your data in CSV and use fgetcsv to read it line by line until you find desired item. Link to comment https://forums.phpfreaks.com/topic/136061-reading-prices-info-from-a-file/#findComment-709446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.