Originally posted by NormanRouxel
					
						
						
							
							
							
							
								
								
								
								
									View Post
								
							
						
					
				
				
			
		This is a simple PHP routine to generate the additional anchor in the correct format, you can add more characters to the array as required, any character in the array is replaced by _.
Code:
	
	<actinic:block php="true" >
 /****************************************************************************
 *
 * MakeProdanchor -
 * @author M Brook 16  Aug 2011
  *
 * usage example:
 * MakeProdRefList($ProductId)
 *
 * MakeProdRefList - 		This is the main call, which generates the product anchor
 *
 * @param str $ProductId 	the Product ID to start from. 
 *
 ****************************************************************************/
 if (!function_exists('MakeProductAnchor')) {
	function MakeProductAnchor($ProductId) {
		$replace = array("!","-","^","*"); 
		$ProdId = "a".str_replace($replace,'_',$ProductId);
		// set results in page
		echo $ProdId;
		return;
	}
 }
/* end of file */
</actinic:block>
Code:
	
	<a name="<actinic:block php="true" > MakeProductAnchor('<actinic:variable name="ProductID" selectable="false" />');</actinic:block>"></a>
Comment