Excel to PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kleptomania
Forum Newbie
Posts: 8
Joined: Mon Mar 22, 2004 9:03 am

Excel to PHP?

Post 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?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post 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;
Post Reply