php substr remove last character : tag