Page 1 of 1

getting key value after page submitted

Posted: Sat Jun 14, 2003 8:39 pm
by forbes
Hi all,
I am quite new to php, knowing just enough to break stuff. Anyway, I have an array to populate a product list (an html form pulldown). For example: '4x6'=>12, '8x10'=>15, etc. Once the page is submitted, I am trying to separate the key and value so I can use the value for some equations. (total cost, subtotal, etc.) This has me banging me head on the wall. Any help with this seemingly simple, yet elusive solution?

Thanks in advance,
Forbes

Posted: Sat Jun 14, 2003 8:51 pm
by Paddy
I am really not sure what you are asking. It sounds like you are after string manipulation. If that is the case try here

http://au2.php.net/manual/en/ref.strings.php

They are all the functions available for strings. If you want more specific help then please be a little more descriptive of what it is you are after. Or you could just wait for someone more coherent. :)

Posted: Sat Jun 14, 2003 9:37 pm
by McGruff
From the manual, php.net:

"A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' "

Think that applies to array key names too.