regex teaser
let's contend have 2 php variables:
- $name = 'caption';
- $url = '';
the quarrel twine '{@url,<img src="," alt="{@name}" />}' should return:
'<img src="http://domain.com/photo.jpg" alt="caption" />'
the {tag} takes adult 3 parameters: {@variable[,text_before][,text_after]}.
what regex indispensable happen? machiavellian biased {@..} add-on nested within another.
Comments
Post a Comment