I have array like this:
array(
[0] => Array
(
[q_id] => 314
[answer_type] => RI
[answer] => 3438
[user_id] =>
)
[1] => Array
(
[q_id] => 286
[answer_type] => NM
[answer] => 5
[user_id] =>
)
[2] => Array
(
[q_id] => 207
[answer_type] => SS
[answer] => 1
[user_id] => 1
)
)
Its expected to have same user_id for all questions that have value for user_id or empty. I want to replace empty user_ids with the existing user_id.
Any better ways to do it other than looping / array_walk?