Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged replace
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
The following code sample shows how developers can replace multiple texts in a single API call in a PDF file using Aspose.Pdf for Cloud API in their applications. Developers can use Aspose REST API with any language: .NET, Java, PHP, Ruby, Rails, Pyt...
0
1893
posted 10 years ago by johansonkatherine
Search for a string, if matched replace with second provided paramater. Third parameter is the variable whose value is the string you'd like to search.
0
916
posted 13 years ago by inreflection7
You can get hostname from script environment - getenv("HTTP_HOST")
(?!'.$host.') matches URLs always except local links
0
825
posted 15 years ago by kossmoss
Affects <A> tags for links starting with $link
Example: LinkReplacer ($text, 'http://www.snipplr.com') affects to
<a href="http://www.snipplr.com">Snipplr</a>
and <a href="http://www.snipplr.com/blog">Snipplr Blog</a>
0
938
posted 15 years ago by kossmoss
This function uses the power of regexp to check if some bad word are on the text, also offers the posibility to change those word for something else. Examples:\r\n\r\n$texto = \'fuck off!\';\r\nfiltrado($texto); returns true since a bad word has been...
1
1042
posted 16 years ago by oso96_2000
Strip out non-alphanumeric characters. Very useful for use with filenames.
3
978
posted 17 years ago by andyhartleeds
« Prev 1 Next »