plznty Posted August 27, 2011 Share Posted August 27, 2011 How could I only get the [value] area out of the string document.observe("dom:loaded", function() { initView([value], [random]); }); Thanks in advance, I've tried with explodes etc, just got a bit crusty from not doing enough PHP lately Link to comment https://forums.phpfreaks.com/topic/245799-getting-area-from-string/ Share on other sites More sharing options...
sasa Posted August 27, 2011 Share Posted August 27, 2011 $a= 'document.observe("dom:loaded", function() { initView([value], [random]); }); '; preg_match('/initView\(\[(.*?)\]/', $a,$out); echo $out[1]; Link to comment https://forums.phpfreaks.com/topic/245799-getting-area-from-string/#findComment-1262609 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.