Skip to content
Advertisement

select column value from row by column index – laravel php

I want to select column value from a row by column index. I am trying to fetch data from a mysql database by using laravel php framework. I am able to select column value by its name but I didn’t find a way to select by column index.

JavaScript

Advertisement

Answer

why you can’t access with index because $value is associative array, to access by index you can use array_value($array) which return the index array

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement