I will illustrate code what I'm doing:
I have data that has strings such as:
[[-55-]], [[-75-]]
Which I use to do something like:
$var = 'hi my name is [[-55-]] and I think yoda looks like a bald green [[-75-]].';
$var = str_replace('[[-', '<img src="/', $var);
$var = str_replace('-]], '">', $var);
What I would like to do is end up with the image output something like:
<a href="/stuff/55/"><img src="/55.png"></a>
The problem is, that takes more than a simple str_replace and I am beyond terrible at regex.
Any help would be appreciated.