I am working on a php code as shown below in which the values (let us supposed I entered 12, 13, 14) of $data->{"articles_id_" . ICL_LANGUAGE_CODE} is coming through admin portal.
Let us suppose I have entered 12, 13, 14 for "articles_id_" . ICL_LANGUAGE_CODE
Php code:
'post__in' => array($data->{"articles_id_" . ICL_LANGUAGE_CODE}),
On debug it is returning:
[post__in] => Array
(
[0] => 12, 13, 14
)
Whereas I want to be returned like this:
[post__in] => Array
(
[0] => 12
[1] => 13
[2] => 14
)
Problem Statement:
I am wondering what changes I should make in the php code above so that its return in the way I want.