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? Quote 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? Quote 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. Quote 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 Quote 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?!? Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.