yuso6363 Posted October 7, 2010 Share Posted October 7, 2010 I am trying to get more than one row from a database at once, then explode each value into a seperate variable. is there a way of doing this? Link to comment https://forums.phpfreaks.com/topic/215315-lots-of-exploding/ Share on other sites More sharing options...
chintansshah Posted October 7, 2010 Share Posted October 7, 2010 If I understand you properly then you can implement like this $query = mysql_query("SELECT * FROM table_name"); while($row = mysql_fetch_array($query)) { // you can apply explode here on each row data like name and school $name_arr = explode("-",$row["name"]); $school_arr = explode("-",$row["school"]); } I hope above code helps you. Link to comment https://forums.phpfreaks.com/topic/215315-lots-of-exploding/#findComment-1119691 Share on other sites More sharing options...
phpchamps Posted October 7, 2010 Share Posted October 7, 2010 your question is not at all clear.. and solution suggested by Mr. Chintan not gonna help you.. Please post your clear requirement.... Link to comment https://forums.phpfreaks.com/topic/215315-lots-of-exploding/#findComment-1119736 Share on other sites More sharing options...
yuso6363 Posted October 7, 2010 Author Share Posted October 7, 2010 My site is a virtual pet website and I am trying to add a pet breeding page. I need it to get every pet that has the persons user id on it then show a link to the person to choose a male pet from the list and a female pet from the list. I can't get it to fetch more than one pet at once Link to comment https://forums.phpfreaks.com/topic/215315-lots-of-exploding/#findComment-1119922 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.