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 Quote Link to comment 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]; Quote Link to comment 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.