I'm learning a bit of PHP and have managed to get my brand names variable and remove the spaces replacing them with dashes as per the brand image.
I can get the result to echo and it shows correct.
What I don't understand is how to get this echo to replace my brands variable.
Can anyone help?
<actinic:block php="true" >
$sOriginal = "<actinic:variable name="Brand" />";
$sOriginal = preg_replace('/ /', '-', $sOriginal);
echo $sOriginal;
</actinic:block>
<actinic:block if="Brand%20%20%21%3d%20%22None%22" >
<a href="http://www.stitchfactory.co.uk/acatalog/<actinic:variable name="Brand" />.html" TARGET="_blank">
<img border="0" src="Brands\<actinic:variable name="Brand" />.gif" align="left" /> </a>
</actinic:block>
I can get the result to echo and it shows correct.
What I don't understand is how to get this echo to replace my brands variable.
Can anyone help?
<actinic:block php="true" >
$sOriginal = "<actinic:variable name="Brand" />";
$sOriginal = preg_replace('/ /', '-', $sOriginal);
echo $sOriginal;
</actinic:block>
<actinic:block if="Brand%20%20%21%3d%20%22None%22" >
<a href="http://www.stitchfactory.co.uk/acatalog/<actinic:variable name="Brand" />.html" TARGET="_blank">
<img border="0" src="Brands\<actinic:variable name="Brand" />.gif" align="left" /> </a>
</actinic:block>
Comment