I'm trying to find a block of text and replace it with a modified block of text and for some reason it's not working. I can execute the following line in my phpDesigner editor and it works perfectly, but when I try to execute the same command on my linux webserver it doesn't work.
Can someone help me out with a solution whether it's via regex or some other method?
$tmp_code = str_replace('<!--
{if="$membership.field_files"}
<li><a href="/Members/Listings.html?id={$listing.id}&action=files"><span>Files</span></a></li>
{else}
<li><a href="/Members/Listings.html?id={$listing.id}&action=files"><span>Files</span></a></li>
{/if}
-->','{if="$membership.field_files"}
<li><a href="/Members/Listings.html?id={$listing.id}&action=files"><span>Add/Remove Offers, Products and Files</span></a></li>
{else}
<li><a href="/Members/Listings.html?id={$listing.id}&action=files"><span>Add/Remove Offers, Products and Files</span></a></li>
{/if}',$tmp_code);