recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
This function scans string for matches to
pattern, then replaces the matched text
with replacement.
The modified string is returned. (Which may mean that the original string is returned if there are no matches to be replaced.)
If pattern contains parenthesized
substrings, replacement may contain
substrings of the form
\\digit, which will
be replaced by the text matching the digit'th parenthesized
substring; \\0 will produce the entire
contents of string. Up to nine substrings may be used.
Parentheses may be nested, in which case they are counted by the
opening parenthesis.
If no matches are found in string, then
string will be returned unchanged.
For example, the following code snippet prints "This was a test" three times:
One thing to take note of is that if you use an integer value as
the replacement parameter, you may not get
the results you expect. This is because
ereg_replace() will interpret the number as
the ordinal value of a character, and apply that. For instance:
Tip: preg_replace(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg_replace().
See also ereg(), eregi(), eregi_replace(), str_replace(), and preg_match().
Another Useful functions:
function.mb-ereg-search | function.mb-ereg-search-setpos | function.mb-ereg-search-regs | function.mb-ereg-search-pos | function.mb-ereg-search-init | function.mb-ereg-search-getregs | function.mb-ereg-search-getpos | function.mb-ereg-replace | function.mb-ereg-match | function.ereg-replace |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.