P
P
playwithbrain2017-09-04 09:49:56
PHP
playwithbrain, 2017-09-04 09:49:56

How to cast an array to a normal type?

There is an array

array (
  'order' => 'new',
  'comment' => '',
  'charset' => 'UTF-8',
  'rus-sname' => 
  array (
    1 => 'Фамилия 1',
    2 => 'Фамилия 2',
  ),
'rus-name' => 
  array (
    1 => 'Имя 1',
    2 => 'Имя 2',
  ),
'client_email' => '***@mail.ru',
)

This array is stored in this form in the database (I understand that this is not correct, but it's too late to redo it). I get it from the database and I have a string type, not an array ... How can I actually bring it into an array so that I can take values ​​from this "array"? Thanks in advance for your help in resolving this issue!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2017-09-04
@playwithbrain

Well, something like this, for example: $str is your string from the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question