How to solve the "Fatal error: Cannot use string offset as an array"?
I create one function that provide the data by passing id to it.
I used this function in for loop and pass the ID's one by one.
From this function I got all data properly. But when I take this data into the variable in same for loop
I got "Fatal error: Cannot use string offset as an array".
To resolve this problem, I used another for loop.
But can I solve this problem by using only one for loop or any other option?
I create one function that provide the data by passing id to it.
I used this function in for loop and pass the ID's one by one.
From this function I got all data properly. But when I take this data into the variable in same for loop
I got "Fatal error: Cannot use string offset as an array".
To resolve this problem, I used another for loop.
But can I solve this problem by using only one for loop or any other option?
No comments:
Post a Comment