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
Post a Comment