Do you have a question? Post it now! No Registration Necessary. Now with pictures!
January 29, 2006, 9:28 pm
rate this thread
I know I'm over looking something simple, so maybe somene here can help
I'm unsuccessfully trying to dereference an element of an array. I'm
trying to get the name of a PDO database column.
$rows->getColumnMeta($recNumber) will return an array with all my db
I want to be able to get the column name (name=>id) in element in 1
statement: Something like:
print "name = : " . $rows->getColumnMeta($recNumber)['name'] . " \n";
But this does not work.
Instead I've been forced to use the much less elegant:
$tmp = $rows->getColumnMeta($recNumber);
$colName = $tmp['name'];
This works but I know that there is a better way of doing this.
Any suggestions would be appreciated.