php - preg_match a "shortcode" to create an array with semantic array keys -


How do I pre-find the following part of "shortcode" so that the video and align array keys are in their quotation? [video = "123456" align = "left" /]

 < Code> $ string = '[video = "123456" align = "left" /]'; $ String = preg_replace ("/ \ | | \ \ | | \] /", "", $ string); $ S = explosion ("", $ string); Forex Currency ($ s $ item) {catalog ($ tag, $ value) = explosion ("=", $ item); $ Array [$ tag] = $ value; } Print_r ($ array);  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -