Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/1.php on line 1

Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/0.php on line 1
PHP. Руководство по PHP. 2005 (создание и продвижение сайта)
создание и продвижение сайта (вбиваю в ТОП-10, как гвозди)Настройка и сопровождение платной рекламы яндекс.директ

PHP. Руководство по PHP. 2005

eregi_replace

Пред.

След.

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().

Пред.

Начало

След.

ereg

Уровень выше

eregi

Отвечу на любые вопросы. С уважением, Дмитрий Владимирович.

Ваше письмо×
Free Web Hosting