0

I'm attempring to save the keys of mysql records in an array but get the Fatal Error: Can't use function return value in write context.. The code is:

for ($i = 0; $i < $tranrows; ++$i)
{ $tranrec = mysql_fetch_row($tranresult);
  $keyarray($i) = $tranrec[0];
}

I've done all the mysql code OK; just trying to save the first field of the SELECTed record into an array for subsequent processing. If I remove the $tranrec[0] assignment everything works fine.

Edited by peter_budo: Correcting closing tag that should be [/code] instead of [icode]

2
Contributors
1
Reply
4
Views
6 Years
Discussion Span
Last Post by vibhaJ
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.