CyBerAliEn - 4:29 pm on Apr 29, 2010 (gmt 0)
If "rowName" is actually the name of the column/field... you should change your variable to reflect this! It is otherwise very confusing. It's like naming a variable "fruitArray" if it actually a string; bad practice!
So let's say "rowName" is now "colName".
If the array "targetList" contains a list of column names (fields) for the table... and "i" represents their index (ie: "i=3" and the item with index 3 is 'fullname', which is what you want)... then yes, your code works as:
$colName = $targetList[$i];