gaza165 Posted August 19, 2008 Share Posted August 19, 2008 I am retrieving a string from my database in this form first, second, thid, fourth, fifth etc thats how they are put into the database.. when i bring them back from the database, i wish to sepearate these words into different strings. ie first second third fourth fifth etc It should be really simple but i cant think of the code for it!! any ideas will be so good!! thanks Garry Link to comment https://forums.phpfreaks.com/topic/120384-solved-splitting-strings/ Share on other sites More sharing options...
moselkady Posted August 19, 2008 Share Posted August 19, 2008 Use explode to split the string into several array elements: <?php $string = "first, second, thid, fourth, fifth"; $array = explode(", ", $string); ?> Link to comment https://forums.phpfreaks.com/topic/120384-solved-splitting-strings/#findComment-620266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.