I need to "convert" the following:

  Todays Date:      20-Nov-2001 10:58:24AM
  Order ID:         W25
  Customer Email:   [EMAIL PROTECTED]
  Email Promotions: Ok

  Business Name:
  Contact Name:     Ashley M. Kirchner
  Day Number:       800 555-1212
  Evening Number:   303 555-1212
  Fax Number:
  Address:          3550 Arapahoe Ave #6
  City:             Boulder
  State/Province:   CO
  Zip/Postal Code:  80303
  Country:          USA

  Payment Method:   CC

  Card Number:      99****1234
  Expiration Date:  01/71

  Shipping Method:  PICKUP
  Order Comment:
  Gift Message:

    ...into $key, $value pairs.  Ideally, I'd like to be able to name/use my own names 
for $key so I can end up with something like:

    $BillToContact  => 'Ashley M. Kirchner'
    $BillToDayPhone => '800 555-1212'
    $BillToEvePhone => '303 555-1212'
    (or maybe with something like:
      $bill['contact']  => 'Ashley M. Kirchner'
      $bill['dayphone'] => '800 555-1212'
      $bill['evephone'] => '303 555-1212'

    All of these variables will eventually be shoved into a DB once the entire form 
has been parsed.

    And then, at the bottom of that same (submitted) form, there's the actual 
information on the order, which looks something like this (the spacing is slightly 

(unfortunately, this will wrap rather ugly)
  ORDER NO.  QTY  UNIT   DESCRIPTION                                PRICE   TOTAL
  4x6        1    4"x6"  Standard Print (full-frame from 35mm)        .75   $0.75
  4x6        1    4"x6"  Standard Print (full-frame from 35mm)        .75   $0.75
  5x7.5      1    5x7.5  Image:Uploaded Image 3                      4.25   $4.25
  8x12       1    8x12   Classic Full Frame Image:Uploaded Image 4  10.25  $10.25

                                                             SUBTOTAL:     $16.00
                                                                  TAX:      $1.18
                                                             SHIPPING:      $0.00
                                                                TOTAL:     $17.18

    This part again I'd like to break up into separate lines, and separate variables 
for the product no., the quantity, unit, decription, price, total (per line), then the 
subtotal, tax, shipping cost and final (grant) total.

    Again, if I can somehow use my own variable names, that'd be great.


    I don't know yet how to create different entries for each line in that order - 
kinda stupid to create $product_1['no'], $product_2['no'], $product_3['no'], 
$product_4['no'], but then again, I don't know.

H | "Life is the art of drawing without an eraser." - John Gardner
  Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
  Director of Internet Operations / SysAdmin    .     800.441.3873 x130
  Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave, #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to