> > > Below is string let's name it A. > > > > ttttttttttttttttttttttttttPhiladelphiaFirstadate05Oct2004ttttttttttt > > > ttt > > > > > > I want to get string B. That looks like > > > PhiladelphiaFirstadate05Oct2004 > > > > > > No characters before Philadelphia and after 20004 > > > >Is the character you want to remove ('t') always the same? > > > No. It just an example
An accurate example of what you're actually going to be doing would help. For this example I would have suggested: <?php $str = "ttttttttPhiladelphiaFirstadate05Oct2004tttttttt"; $str = trim( $str, "t" ); print( $str ); // outputs "PhiladelphiaFirstadate05Oct2004" ?> Cheers, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php