php - dynamic foreach into variable array

i want to ask you how to dynamic value $v['answer_1'] in foreach php i give you example my code how can i dynamic answer
foreach($isi as $key=>$v){
$tulis[] = array(
$v['data1']
,$v['data2']
,$v['data3']
,$v['answer_1']
,$v['answer_2']
,$v['answer_3']
,$v['answer_4']
,$v['answer_5'] );
how can variable $v['answer'] can dynamic variable can $v['answer_6'],$v['answer_7'] etc no hardcode like this, i hope this clear
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to undefined function str_contains()
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.