Really robust and simple way to do it is to have a struct with key and value fields. Lets call it pair (name derived from C++ class of the same name and purpose). Also you should think of the types you want have for the pair fields. I give an example as char to string values as your php example. But in order to use different types you must use void*, but that will result in a very complicated and probably bug prone implementation.
Something like
struct
{
char key;
char* value;
}pair;
struct pair map[size];
pair assocation;
assocation.key = 'a';
assocation.value = "Apple"; // Be sure to allocate the C strings so that you do not introduce memory leak or data corruption, same for void*. This here is just an hack.
map[0] = assocation;
// Later in your algorithms and parsers you just access it as an value in array.
pair aPair = map[1];
char aKey = aPair.key;
char* aValue = aPair.value;
When you want a linked list like associative array, then add one more field to a struct:
void* nextPair;
With that you can allocate you key-value pairs everywhere and do not need to contain them in a single array.