Jump to content

Function to skip strtolower() if variable contain "wikipedia.org"


ArizonaJohn

Recommended Posts

Hello,

 

My site allows users to enter URLs into a database.  I am using the code "$site = strtolower($site);" to make all of these URLs lower-case.

 

However, I just realized that Wikipedia URLs are case sensitive, so I would like to avoid using "$site = strtolower($site);" on Wikipedia URLs, all of which contain "wikipedia.org".

 

How could I write a function that will skip over the step "$site = strtolower($site);" if $site contains "wikipedia.org"?

 

Thanks in advance,

 

John

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.