Rhynel
2 months ago
187
3
Laravel

Array and Object how to solve this? Any help?

Posted 2 months ago by Rhynel

return ([ "First Data", "Second Data" ]);

It works fine

But when I use this

$Orders->Status = ["First Data", "Second Data"]

From Database

return $Orders->Status;

It print the whole thing

The output is

"First Data", "Second Data"

Not an array. How to make it an array or separate 1st data and the second for a loop? How to make an array of an Object?

Please sign in or create an account to participate in this conversation.