sigh...please implement in forum:

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

sigh...please implement in forum:

Post by redhair »

Code: Select all

<?php
$message = preg_replace("/Newbie/", "5 year old, and coulndt find the manual", $message );
?>
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

For such a simple regex, you'd be better off using the quicker and simpler str_ireplace

Code: Select all

$forms[] = "newbie";
$forms[] = "noob";
$forms[] = "noobie";
$forms[] = "n00b";
$forms[] = "n00bie";
$message = str_ireplace($forms,"5 year old who has searchophobia",$message);
:)
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

lmao


May i suggest carrying this in your sig, it might help...



Image
Post Reply