The Product name consists of a string - number like:
Chains-23x10 5R 12
I want to display the substring before -
in one line and the substring after -
in next line. I tried it with the code:
<?php $str = substr($str, ($pos = strpos($str, '-')) === false ? 0 : $pos + 1); ?>
<?php echo $str; ?>
But only the string after -
is getting displayed.
Someone help please.