[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 367
  • Last Modified:

PHP Replace text with link

Hi I i making a system where i take data from database and replace it in text with links for example:

I have database where i have replace all data backup with link for exampl <a href='website.com'>data backup</a>

I know how make it is ease but the problem when i have for example Data backup it will not found it and will not replace. How i can make system where php script can search for similar content like if first letter is capital or last or full word is capital.

Can you please help me with some information.
0
umaxim
Asked:
umaxim
1 Solution
 
Ray PaseurCommented:
strpos() has a case-insensitive variant stripos().
http://us.php.net/manual/en/function.stripos.php

Most of the PHP string functions have similar variants.  In regular expressions you can use the "i" modifier to make the match be case-insensitive.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now