Php replaces the alt and title labels of the image. To replace all images or the connected alttitle, we must use the regular expression function. let's take a look at the alt instance * preg_replace (# alt [^] * # I, alt. $ title ., $ str); * to replace all images or the connected alt title, we must use the regular function. let's take a look at a replacement image alt instance.
*/
Preg_replace ('# alt = "[^"] * "# I', 'alt =" ". $ title." "', $ str );
/*
Mixed preg_replace (mixed pattern, mixed replacement, mixed subject [, int limit])
Search for matches in pattern in subject and replace them with replacement. If limit is specified, only limit matches are replaced. if limit is omitted or its value is-1, all matches are replaced.
Filter all html tags
*/
$ Html_body ="
Fdafdsa
Content
";
Preg_replace ("/( ] *>)/E ",
"'1'. strtoupper ('2'). '3 '",
$ Html_body );
// For more details, see: php Tutorial er/php-function/32.16.htm"> http://www.bKjia. c0m/phper/php-function/32.16.htm
The regular function must be used to replace the title. let's look at a replacement image alt instance */preg_replace ('# alt = [^] * # I', 'alt =. $ title. ', $ str);/* m...