URL からこれらの一意の値を返したい
394_black
500_mono2
URL:
/shop/swarovski/394_black_the-reagan-swarovski-maxi-dress
/shop/celeb/500_mono2_the-reagan-swarovski-maxi-dress
PHPでこれを行うことはできますか?
疑似コード
$url = get url
$firstvar = after 3rd / and after second _ save text (500_mono2) from $url
$secondvar = using $firstvar return only first 3 numbers
//substr($firstvar, 0, 3); (I think this will be it)