m00nz00mer Posted February 27, 2008 Share Posted February 27, 2008 hey im having some problems with this code... basically the array returns not errors but the value 'Array' this is the code.. anyone knwo why its doing this? $bookAuthorQueryResults = mysql_query($bookAuthorQuery); //$bookAuthor = mysql_result($bookAuthorQueryResults, 0); $num_rows_author = mysql_num_rows($bookAuthorQueryResults); echo "Author(s): "; if($num_rows_author>0) { while ($authorArray = mysql_fetch_array($bookAuthorQueryResults)) { //Author Query echo "<div class='detailTextGrey'>".$authorArray.", </div>"; } } else { echo "No authors have been listed."; } ?> Link to comment https://forums.phpfreaks.com/topic/93374-troublesome-array/ Share on other sites More sharing options...
sasa Posted February 27, 2008 Share Posted February 27, 2008 change line echo "<div class='detailTextGrey'>".$authorArray.", </div>"; to echo "<div class='detailTextGrey'>".$authorArray[0].", </div>"; Link to comment https://forums.phpfreaks.com/topic/93374-troublesome-array/#findComment-478293 Share on other sites More sharing options...
m00nz00mer Posted February 27, 2008 Author Share Posted February 27, 2008 thank you:) Link to comment https://forums.phpfreaks.com/topic/93374-troublesome-array/#findComment-478298 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.