Level 22
@muazzamazaz I think it is because you are calling getTank() inside loop?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
let arrayOfFunctions = ref([])
function getTank(tank){
let url = '/gettank/'+tank;
axios.get(url)
.then(function(response){
arrayOfFunctions.value.push(response.data);
})
.catch(function(error){
console.log(error);
});
}
<tr class="border-b border-slate-200" v-for="(item, index) in farray" :key="item.id">
<td>
{{getTank(item.tankno)}}
{{arrayOfFunctions}}
</td></tr>
When I call its pushing same values infinite times
Please or to participate in this conversation.