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
Replace regular expression with multibyte support

mb_ereg_replace

(PHP 4 >= 4.2.0, PHP 5)

mb_ereg_replaceReplace regular expression with multibyte support

Description

string mb_ereg_replace ( string $pattern , string $replacement , string $string [, string $option= "msr" ] )

Scans string for matches to pattern , then replaces the matched text with replacement

Parameters

pattern

The regular expression pattern.

Multibyte characters may be used in pattern .

replacement

The replacement text.

string

The string being checked.

option
Matching condition can be set by option parameter. If i is specified for this parameter, the case will be ignored. If x is specified, white space will be ignored. If m is specified, match will be executed in multiline mode and line break will be included in '.'. If p is specified, match will be executed in POSIX mode, line break will be considered as normal character. If e is specified, replacement string will be evaluated as PHP expression.

Return Values

The resultant string on success, or FALSE on error.

Notes

Note: The internal encoding or the character encoding specified by mb_regex_encoding() will be used as the character encoding for this function.

See Also


How do i add \ before all ' in my string without using ereg_replace()?
Categories : Strings, PHP
formating MySQL Timestamp to get a propper Output. related : Timestamp, ereg_replace, mysql, substr
Categories : MySQL, PHP, Date Time, Databases
Wraps a HTML(!) string to a given number of characters using a string break character
Categories : PHP, Strings, HTML and PHP



SQL_CALC_FOUND_ROWS - How to know the number of rows a query would have returned if there was no LIMIT set on the query using php5 and mysqli.Usfull with Pagination (Paging).
Categories : PHP, Databases, MySQL
How to get the 10 biggest numbers out of an INT column.
Categories : General SQL, Databases
A list of known port numbers
Categories : Network
Full membership authentication system.
Categories : Authentication, MySQL, PHP, Databases
How to validate an Israeli ID number.
Categories : Ecommerce, PHP, Algorithms
Dynamic WHERE CLAUSE depending on number of FORM FIELDS
Categories : ODBC, General SQL, PHP, Complete Programs, Databases
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
Permutations, Combinations and Factorials
Categories : PHP, PHP Classes, Math.
A PHP function to encrypt and decrypt a number or string or a combination of the two.
Categories : PHP, Encryption, Security
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