I think this has been done a million times but I can't get the expression right.
I need to str_replace
an <input>
element and everything between the So capture the id and the name enz...
So I thought:
<?php
$regex = '<input(.*?)>';
$replacement = '<select>';
$content = '<input id="id" name="name"/>text';
$result = str_replace($regex, $replacement, $content);
echo $result;
?>
I know this won't work but I think this should be the right way.
Anyone?