IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   PHP (https://www.ircforumlari.net/php/)
-   -   text içinde istenilen kelimeyi renklendirmek (https://www.ircforumlari.net/php/640983-text-icinde-istenilen-kelimeyi-renklendirmek.html)

hAte 07 Kasım 2014 06:26

text içinde istenilen kelimeyi renklendirmek
 
PHP- Kodu:

$text "Sample sentence from KomunitasWeb, regex has become popular in web programming. Now we learn regex. According to wikipedia, Regular expressions (abbreviated as regex or deneme, with plural forms regexes, regexps, or regexen) are written in a formal language that can be interpreted by a regular expression processor";
$text preg_replace("/b(deneme)b/i"'<span style="background:#5fc9f6">1</span>'$text);
echo 
$text



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 09:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk