How to json encode Specific key in PHP? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
10th Apr 2021, 7:12 AM
Dhaval Makwana
Dhaval Makwana - avatar
5 ответов
+ 1
I have an idea using array_filter(), but I'm not sure. https://code.sololearn.com/wc5dYHIT3eZC/?ref=app
10th Apr 2021, 7:55 AM
Ipang
+ 1
Do you have any specification about which key to be selected? or just random one? For the example in your code, which particular one is to be selected?
10th Apr 2021, 7:27 AM
Ipang
+ 1
Ipang I want to select key1 to json encode
10th Apr 2021, 7:28 AM
Dhaval Makwana
Dhaval Makwana - avatar
+ 1
Thank you Ipang
10th Apr 2021, 12:45 PM
Dhaval Makwana
Dhaval Makwana - avatar
+ 1
No problem 👌
10th Apr 2021, 12:50 PM
Ipang