Support the ongoing development of Laravel.io →
Views Blade
Last updated 2 years ago.
0

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

0

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)

0

Any ideas? Please? :)

0

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.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

RabbitSC2 rabbitsc2 Joined 15 May 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.