I have a text file that contains
[http://mydomain.com]
I am using php to convert this text file to html (to then use as an input file for an import function)
So I need to replace the opening [ with <a href="
and the closing ] with "></a>
However my str_replace has a syntax error as I cannot add the closing "
What I have currently is
[php]
$line1 = str_replace (’[’,’,$line1);
[/php]
I cannot reconstruct this string like this so how can I do this?
TIA