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