hi! as a warning I have very limited experience with PHP, with just over 1 month of learning it.
I have a textform that when its submitted it goes through str_replaces on the allowed tags (eg [img]) to turn them into html tags.
What I want to do Is grab the URLS from the $string and add links to the original image and the url to the resized. What im basically asking, i guess, is how do i grab urls from a string? so that I can use them to add links to resized imgs.
<a href="linkToOriginal"><img src=""location/resize.php?file=', $string);`
what i do at the moment is just replace [img] with html img tag which is put right next to the url in the text field. $string being the large body of text.
$imageOpen = str_replace('[img]', '<img src="http://location/resize.php?file=', $string);
$imageClose = str_replace('[/img]', '"/></a>', $imageOpen);
If this isnt clear please tell me, as im pretty awful at explaining things!