[email protected] Posted November 19, 2009 Share Posted November 19, 2009 I need to split the paragraph based on many signs, also based on whenever space is encountered. $emails = split('[<>;:,\/"{}*!?]',$para); //split based on various signs also need to include SPACE...how? Help me split on space also.. Link to comment https://forums.phpfreaks.com/topic/182218-solved-split-on-space/ Share on other sites More sharing options...
emopoops Posted November 19, 2009 Share Posted November 19, 2009 i think u add a space Link to comment https://forums.phpfreaks.com/topic/182218-solved-split-on-space/#findComment-961529 Share on other sites More sharing options...
roopurt18 Posted November 19, 2009 Share Posted November 19, 2009 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged. Sounds like you may want to use preg_split() instead. Link to comment https://forums.phpfreaks.com/topic/182218-solved-split-on-space/#findComment-961530 Share on other sites More sharing options...
[email protected] Posted November 19, 2009 Author Share Posted November 19, 2009 What will be my preg_split then? Link to comment https://forums.phpfreaks.com/topic/182218-solved-split-on-space/#findComment-961532 Share on other sites More sharing options...
roopurt18 Posted November 20, 2009 Share Posted November 20, 2009 $para = "Sara wants<the>big;cat:to,behave\\while/she's\"gone. What{do}you*want.! I?dunno."; print_r( preg_split( '@[ <>;:,\\\\/"{}*!?]@', $para ) ); Link to comment https://forums.phpfreaks.com/topic/182218-solved-split-on-space/#findComment-961537 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.