$sku="00-R2-1001XL";
eregi_reaplace ('(00-)?','',$sku);
This manages to strip the 00- off.
eregi_reaplace ('X*[SML]$','',$sku);
This manages to stip the size denomintor off the variable
HOW DO I COMBINE BOTH IN ONE EREGI_REPLACE COMMAND?
THANKS
Moderator: General Moderators
Code: Select all
<?php
$sku = pregi_replace('/(00|XXL$|XL$|L$|M$|S$)/','',$sku);
?>