Created
June 7, 2017 14:45
-
-
Save arto-heino/b136f78bf86cd1d0ba70e1f74c19e973 to your computer and use it in GitHub Desktop.
kysymykset_vasgtaukset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for($i=0;$i<count($kysymykset);$i++){ | |
if(count($vastaukset) > 0){ | |
foreach($vastaukset as $key){ | |
if ($kysymykset[$i]['TherapygroupQuestions']['id'] == $key['TherapygroupAnswers']['question_id']) { | |
$kysymykset_vastaukset[$i] = array_merge($kysymykset[$i]['TherapygroupQuestions'], array('vastaus' => $key['TherapygroupAnswers']['vastaus'], 'vastaus_id' => $key['TherapygroupAnswers']['id'])); | |
} | |
} | |
}else{ | |
$kysymykset_vastaukset[$i] = array_merge($kysymykset[$i]['TherapygroupQuestions']); | |
} | |
} |
Author
arto-heino
commented
Jun 9, 2017
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment