cliftonbazaar Posted March 4, 2011 Share Posted March 4, 2011 $teamLineUp=explode(";", $team['lineUp']); #This is the team line up foreach ($teamLineUp as $value) echo "<BR>".$value; this works fine and outputs what I want EXCEPT if a word has a ' in it; for example the name O'Reilly gets broken into 2 values "O" and "Reilly"; is there a way around this? Link to comment https://forums.phpfreaks.com/topic/229563-array-not-being-exploded-properly/ Share on other sites More sharing options...
Muddy_Funster Posted March 4, 2011 Share Posted March 4, 2011 are you certain that the problem is during the explode and not when the information is actualy being put into the array? Link to comment https://forums.phpfreaks.com/topic/229563-array-not-being-exploded-properly/#findComment-1182725 Share on other sites More sharing options...
cliftonbazaar Posted March 4, 2011 Author Share Posted March 4, 2011 SOLVED For anyone reading this in the future you need a slash in front of the apostrophe - O\'Reilly. Link to comment https://forums.phpfreaks.com/topic/229563-array-not-being-exploded-properly/#findComment-1183047 Share on other sites More sharing options...
Muddy_Funster Posted March 5, 2011 Share Posted March 5, 2011 sooo......not a fault in the explode at all then Link to comment https://forums.phpfreaks.com/topic/229563-array-not-being-exploded-properly/#findComment-1183075 Share on other sites More sharing options...
cliftonbazaar Posted March 5, 2011 Author Share Posted March 5, 2011 Nope Just needed to do a fair bit of research before I found the problem. Where has the SOLVED button gone?!? Link to comment https://forums.phpfreaks.com/topic/229563-array-not-being-exploded-properly/#findComment-1183154 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.