In array to get rid of string()?

0 like 0 dislike
7 views
The script from the folder take all the files with the file extension .json, if it's really .json, it removes the file extension, and writes the name (user) into an array $data['users']
And here came the problem, in the mountains there were some string(), here is an example answer:
array(2) { [0]=> string(11) "1enderstore" [1]=> string(5) "sport" }

Output via var_dump()
var_dump($data['users']);

How to convert to a normal array? Namely in array(2) { [0]=> "1enderstore" [1]=> "sport" }

And the most interesting, if you convert to json (var_dump(json_encode($data['users']));), then the answer is:
string(23) "["1enderstore","sport"]"
by | 7 views

2 Answers

0 like 0 dislike
I can not correctly understand the question, but since You output information using var_dump, in any case, it shows the data type (in Your case string).

Unable to output to take advantage of this design
echo ''; print_r( $data ); echo '
'
by
0 like 0 dislike
This var_dump output format with such types.
\rphp.net/manual/ru/function.var-dump.php
The function displays structured information about one or more expressions, including their type and value. Arrays and objects are parsed recursively with different indentation values for a visual display structure.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
asked May 4, 2019 by mrDolte
0 like 0 dislike
1 answer
asked Apr 13, 2019 by webinar
110,608 questions
257,186 answers
0 comments
33,795 users