-1

I've been banging my head against a wall with this one. What I have is a database table which holds references such as {name} etc which map to an array which has been built such as $customer['name']. What I need to do is take the value from the database and get the value from the array.

The value in the database is the same as what would be needed to reference the array (so $customer['name'] would be in the database field).

Can anyone tell me how I would get the array value from this?

Thanks in advance.

1 Answers1

0

I managed to find an answer from this thread - get value from array using string php. What I ended up doing was separating the array name and key with a full stop so $customer['name'] is now stored as customer.name and exploded it to get the array value.

Community
  • 1
  • 1