Category Archives: Web Development

How to get a list of a tables field / column names from MySQL using PHP – getFieldNames() Function

A simple function to replicate the funcationality of the depreciated mysql_list_fields() function. It returns a simple array with a numeric index of the column / field names. $database – String – The database you want to use $connect_string – String – Your connection string $table – String – The...

PHP: How to insert value into array

There are two ‘main’ forms of arrays within PHP, these are numerical (or zero based) and associative arrays. Creating a new array The code below demonstrates creating a new array: $arr = new array(); This is the same for numerical and associative arrays. Numerical Arrays You can think of...
Page 3 of 3123