Copyright © tutorialspoint.com

PHP Function eregi_replace()

previous
Advertisements

Syntax

string eregi_replace (string pattern, string replacement, string originalstring);

Definition and Usage

The eregi_replace() function operates exactly like ereg_replace(), except that the search for pattern in string is not case sensitive.

Return Value

Example

Following is the piece of code, copy and paste this code into a file and verify the result.

<?php

$copy_date = "Copyright 2000";
$copy_date = eregi_replace("([a-z]+)", "&Copy;", $copy_date);
print $copy_date;

?>

This will produce following result

© 2000

previous

Copyright © tutorialspoint.com