olli460 Posted September 24, 2009 Share Posted September 24, 2009 Hello, Ive got a database and im storing a list of IDs in one field like 15, 26, 55 They are the IDs of the videos they have added to their favorites. How can i split these up and display them back to the user? Link to comment https://forums.phpfreaks.com/topic/175347-solved-favorite-list-how-to-sort-lots-of-numbers-from-one-field/ Share on other sites More sharing options...
Adam Posted September 24, 2009 Share Posted September 24, 2009 $ids = explode(',', $id_str); foreach ($ids as $id) { echo trim($id) . '<br />'; } Link to comment https://forums.phpfreaks.com/topic/175347-solved-favorite-list-how-to-sort-lots-of-numbers-from-one-field/#findComment-924050 Share on other sites More sharing options...
olli460 Posted September 24, 2009 Author Share Posted September 24, 2009 Perfect. Thanks alot! Link to comment https://forums.phpfreaks.com/topic/175347-solved-favorite-list-how-to-sort-lots-of-numbers-from-one-field/#findComment-924055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.