rookie4002 Posted December 11, 2007 Share Posted December 11, 2007 Hi, I'm a php newbie here and would like if someone can help me write the following First I have an excel file composed of 2 columns, the first one different coupon codes (letters and numbers) and the second one has the text either "sold" or "unsold". I convert this file to csv and this is upon what the script should act. The php script should basically do: 1) scan this file starting from the top row and check to see whether that row is sold or unsold (by checking the second column corresponding to that row). 2) If it's unsold then it should save the first column entry (corresponding to the coupon) into a variable (we can call it $coupon), replace unsold by sold in the second column, save the new csv and that's it. 3) If it's sold, then it should move onto the second row and start the checking process again (step 1 but from row 2) I think it could be done in like 10 lines of code but I've been looking around and couldn't exactly figure all the details, I tried some functions but don't have all the syntax nailed. If anybody can help me with this I'd GREATLY appreciate it. Thanks a ton Inaki Quote Link to comment Share on other sites More sharing options...
kts Posted December 11, 2007 Share Posted December 11, 2007 Cmon atleast give it a try! whats the fun in that? Quote Link to comment Share on other sites More sharing options...
rookie4002 Posted December 11, 2007 Author Share Posted December 11, 2007 Lol, I tried for about 2 - 3 hours, but since I don't know anything about php, I had to look up functions, syntax, etc, then upload code to a server everytime I wanted to test something, all in all, it'd take me forever without help! And it doesn't help that I have to take the prelim for my phd after christmas, I should be studying for that. BUT, I need the script to run an ebay store! By the way, the code has to run in a free x10hosting server, but I'm guessing it should have all the php functions required to do this simple thing. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 11, 2007 Share Posted December 11, 2007 You can install a web server, php, and mysql on your PC and learn, develop, and debug code locally - http://www.apachefriends.org/en/index.html Quote Link to comment Share on other sites More sharing options...
rookie4002 Posted December 12, 2007 Author Share Posted December 12, 2007 shameless bump ... please help!!! Thanks!! Quote Link to comment 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.