You cannot "echo" an array, that is the error.
you will need to collect the lines in an array, and then return that array at the end of your getPoints
function
Thanks for the reply, the problem i have is that im trying to prepend each line (value/number) with
array("y" => 3476),
Where 3476 is the number in question (from the plaintext file)
don't echo inside the function, that's so stone age.
if your text file does not have extra lines between lines, you can just read the whole file in to a string, then split it by line ending "\n". this will give you and array.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community