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

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -