Page 1 of 1

Excel to PHP?

Posted: Tue Mar 30, 2004 12:29 pm
by kleptomania
Hello,

how do i write a page that offers to drop down lists for instance

width
100
200
300

length
10
20
30

Then references the user input against an excel spreadsheet i have that shows prices for particular combinations.

the ss is layed out

100 200 300
10 £1 £2 £3
20 £2 £3 £4
30 £3 £4 £5 etc etc

I can do the lookup and drop down in excel, wondered what is needed so i user can use the boxes on a web page and get a price to show?

Posted: Tue Mar 30, 2004 4:59 pm
by kettle_drum
Parse the spred sheet so that its in a multi-dimensional array and use the width and length values as the keys, then just echo the array value of what the user enters.

$array[width][length] = blah;

$array['100']['30'] = 3;