<?php $link = 'http://r10.net/'; if(substr($link,-1)=='/'){$link = substr($link,0,-1);} echo $link; ?>