PHP echo array key
Posted on 2010-09-17
How can I echo the key of a key/value pair in an array. For example:
array([part123]=>Available [part432]=>NotAvailable [part789]=>BackOrdered)
Let's say I want to echo in HTML both the key and the value, in this case the part number and the status but in different table <td>'s.
I can do the echoing and array handling.. but I can't remember how to specifically echo the key.