It is possible to put an array into a multi dim array? I have a list of user settings that I want to return in a JSON array and also have another array stored in that JSON array…what is the best way to do that if it isn’t possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A multi dimension is already an array inside an array. So there’s nothing stopping you from putting another array in there. Sort of like dreams within dreams 😛
Just use associative arrays if you want to give your array meaning
EDIT
To answer your comment,
$output_files[$file_id]['shared_with'] = $shared_info;translates to (your comment had an extra]which I removed)