I have dynamic link build from variable :
/Tinkle/Matte/BlackHyper/Black/Gunmetal
How can I remove all text after variable value "BlackHyper" to become: "/Tinkle/Matte/BlackHyper"
I try rtrim :
$param="BlackHyper";
$str="/Tinkle/Matte/BlackHyper/Black/Gunmetal";
rtrim($str,$param);
No luck , remove some letters....