i have a search script which eliminates the search word from the search results.
foreach ($arrinterests as $interest) {
$interest = trim($interest);
however if the case is different, it does not work. so if i search for 'sports', 'sports' does not get returned, but if i search for 'Sports', 'sports' does get returned.
how do i make it so 'sports' does not get returned when someone searches for 'Sports' how do i trip and case version of the word sports, i.e. SPORTS, Sports, SpOrTs, etc?
how to search for uppercase and lowercase variables?
Moderator: General Moderators
- protokol
- Forum Contributor
- Posts: 353
- Joined: Fri Jun 21, 2002 7:00 pm
- Location: Cleveland, OH
- Contact:
I'm not sure I completely understand what you're asking, but these functions might be useful:
strcasecmp()
strtolower()
strtoupper()
strcasecmp()
strtolower()
strtoupper()