loquela Posted August 15, 2009 Share Posted August 15, 2009 Hi there, I have the following query: ... $row_selected_topics = mysql_fetch_assoc($selected_topics); $totalRows_selected_topics = mysql_num_rows($selected_topics); while ($row_selected_topics = mysql_fetch_assoc($selected_topics)) { $selectedtopics[] = $row_selected_topics['topic_id']; } $matchtopics = implode("|",$selectedtopics); echo ($matchtopics); For some reson, the first record (or is it the last?) is always omitted. Why is this? And how do I fix it? Many thanks in advance. S. Link to comment https://forums.phpfreaks.com/topic/170388-solved-first-record-in-array-not-showing/ Share on other sites More sharing options...
wildteen88 Posted August 15, 2009 Share Posted August 15, 2009 Get rid of this line $row_selected_topics = mysql_fetch_assoc($selected_topics); This is removing the first result. Link to comment https://forums.phpfreaks.com/topic/170388-solved-first-record-in-array-not-showing/#findComment-898840 Share on other sites More sharing options...
loquela Posted August 15, 2009 Author Share Posted August 15, 2009 Doh! Thanks wildteen88 Link to comment https://forums.phpfreaks.com/topic/170388-solved-first-record-in-array-not-showing/#findComment-898841 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.