WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World
Finds first occurrence of a string within another, case insensitive

mb_stristr

(PHP 5 >= 5.2.0)

mb_stristrFinds first occurrence of a string within another, case insensitive

Description

string mb_stristr ( string $haystack , string $needle [, bool $part [, string $encoding ]] )

mb_stristr() finds the first occurrence of needle in haystack and returns the portion of haystack . Unlike mb_strstr(), mb_stristr() is case-insensitive. If needle is not found, it returns FALSE.

Parameters

haystack

The string from which to get the first occurrence of needle

needle

The string to find in haystack

part

Determines which portion of haystack this function returns. If set to TRUE, it returns all of haystack from the beginning to the first occurrence of needle . If set to FALSE, it returns all of haystack from the first occurrence of needle to the end, Default value is FALSE.

encoding

Character encoding name to use. If it is omitted, internal character encoding is used.

Return Values

Returns the portion of haystack , or FALSE if needle is not found.

See Also

  • stristr() - Case-insensitive strstr
  • strstr() - Find first occurrence of a string
  • mb_strstr() - Finds first occurrence of a string within another


Show Source with Line Numbers
Categories : PHP, Regexps, Filesystem
A set of functions to check the validity of a credit card number.
Categories : Ecommerce, Credit Cards, PHP
How to get the 10 biggest numbers out of an INT column.
Categories : General SQL, Databases



Validating Credit Card Numbers Without Bank Involvement
Categories : Credit Cards, Ecommerce, Java Script
A list of known port numbers
Categories : Network
Scramble Eggs - php class to scramble/encode
Categories : PHP, PHP Classes, Security, Encryption
Full membership authentication system.
Categories : Authentication, MySQL, PHP, Databases
Prime number finder (Sieve of Erastothenes)
Categories : PHP, Algorithms, Math.
How to validate an Israeli ID number.
Categories : Ecommerce, PHP, Algorithms
color codes for positive and negative numbers
Categories : PHP, MySQL, Databases, HTML
How to count the number of lines in a file
Categories : PHP, Filesystem
Dynamic WHERE CLAUSE depending on number of FORM FIELDS
Categories : ODBC, General SQL, PHP, Complete Programs, Databases
Function get_week_number which returns the week number of the given date according to ISO 8601:1988, also includes a function is_leap_year.
Categories : Date Time, PHP
Reduce the number of processors on a NT 4.0 system thru BOOT.INI
Categories : WinNT