I was manipulating a string with javascript to split numbers that i need in a pattern like this :
150952-0535
generated from a number like this :
15095205350008
The javascript is like this and it does the trick :
var s7img = '15095205350008';
s7img = '<img src="http://site.com/images/'
+ s7img.substring(0, 6) + "-0"
+ s7img.substring(7, s7img.length - 4)
+ '?$product_stamp$">';
How could I accomplish the same thing just using php? I started poking around with something like :
$sku = "15095205350008";
$s7img = substr($sku, 0,6);
But I am not sure…
According to your javascript.