Re: String manipulation

From: Date: Wed, 11 Jun 2003 14:32:33 +0000
Subject: Re: String manipulation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151070@lists.php.net to get a copy of this message
Use the substr function to get the part you want. Then prefix/suffix the parts you want. //you may want to derive the positions as vars $rest = substr("abcdef", 1, 3); // returns "bcd" //you may want to put the link name into a var as well for below $rest = "<a href=\"" . $rest . ">the link</a>" Good Luck, Jake Johnson http://www.plutoid.com On Wed, 11 Jun 2003, Marios Adamantopoulos wrote: > Hi all > > I wonder if anyone can help with this. > I have a piece of copy that includes this: > [link][title]the > link[/title][address]http://www.php.net[/address][/link] > And I need to change it to this: > <a href="http://www.php.net">the link</a> > > Any help is appreciated > > Mario >

« previous php.general (#151070) next »