I have an array like
Array
(
[select_value_2_1] => 7
)
I want to explode index into Array ([0]=select_value, [1]=2, [2]=1)
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.
You can’t just use
explode()because it will also separateselectfromvalue. You could alter your output so that instead you have array keys likeselectValue_2_1.Then you can do what you want:
That will yield, for example:
You can use array_keys() to extract the keys from an array.