Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

how get all values in a column using php

how get all values in a column using php  using -'php,mysql,arrays'

I've been searching for this everywhere, but still can't find a solution: How do I get all the values from a mySQL column and store them in an array?

For eg:
 Table Name: Customers
 Column names: ID, Name
 # of rows: 5

I want to get an array of all the 5 names in this table. How do I go about doing that? I am using PHP, and I was trying to just:

SELECT names FROM Customers

and then use the


PHP function to store those values in an array.

Any ideas on this?

Thanks in advance!

asked Sep 15, 2015 by ClydeLeidig
0 votes

Related Hot Questions

Government Jobs Opening