Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

eregi_replace

(PHP 3, PHP 4 , PHP 5)

eregi_replace -- replace regular expression case insensitive

Description

string eregi_replace ( string pattern, string replacement, string string)

This function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.

예 1. Highlight search results

<?php
$pattern
= '(>[^<]*)('. quotemeta($_GET['search']) .')';
$replacement = '\\1<span class="search">\\2</span>';
$body = eregi_replace($pattern, $replacement, $body);
?>

See also ereg(), eregi(), and ereg_replace().

 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "PHP 매뉴얼". See Index Page for more info about Authorship and Copyright.

1999-2009 Linuxinfor.com. No rights reserved.