Recent Changes - Search:

edit SideBar


Firefox 2
Get Thunderbird!

PHP /

PregReplace

PHP.PregReplace History

Hide minor edits - Show changes to markup

September 07, 2005, at 12:32 PM by 192.168.1.77
Changed lines 3-4 from:

(:code lang=php: )[=

to:

(:code lang=php:)[=

September 07, 2005, at 12:32 PM by 192.168.1.77
Changed lines 3-4 from:

code lang=php[=

to:

(:code lang=php: )[=

September 07, 2005, at 12:31 PM by 192.168.1.77
Added lines 1-16:

preg_replace()

(: code lang=php:) <?PHP $pattern[0] = '/\[\[tamad\]\]/'; $pattern[1] = '/\[\[sihirli_numara\]\]/'; $replacement[0] = "AdSoyad"; $replacement[1] = "123456789"; $subject = "Metin[[tamad]][[tamad]][[sihirli_numara]]"; $limit = "1"; //Sadece ilk buldu&#287;u de&#287;erleri de&#287;i&#351;tirir. Hepsi i�in "limit = -1" $subject = preg_replace($pattern, $replacement, $subject, $limit); echo $subject;

Edit - History - Print - Recent Changes - Search
Page last modified on September 07, 2005, at 12:32 PM