emjez15 Posted December 14, 2010 Share Posted December 14, 2010 [1]Action Taken: Remarks/Action Taken, Date:Date Action Taken [2]Action Taken: Remarks/Action Taken, Date:Date Action Taken I have this data in my database. what i need is to get the the action taken, from [1] to ,(comma) and add it in a variable or array Link to comment https://forums.phpfreaks.com/topic/221641-get-from-part-of-a-string/ Share on other sites More sharing options...
Maq Posted December 14, 2010 Share Posted December 14, 2010 What part are you having trouble with? (You posted in PHP Math Help, would you like me to move it?) Link to comment https://forums.phpfreaks.com/topic/221641-get-from-part-of-a-string/#findComment-1147272 Share on other sites More sharing options...
theverychap Posted December 30, 2010 Share Posted December 30, 2010 If you don't have too much data yet, it would be best to restructure your database to store it in a more friendly way - this will aid the retreival of data no end! Otherwise you are into crazy uneccessary regex territory: ipreg_match_all ("/".(\\[) .'.*?' .(,) ."/is", $yourCrazyString, $m)) echo '<pre>'; print_r($m); echo '</pre>'; Link to comment https://forums.phpfreaks.com/topic/221641-get-from-part-of-a-string/#findComment-1152918 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.