Hello I got this error message;

Warning: Delimiter must not be alphanumeric or backslash in ....

This is the code causing the problems;

if (preg_match ("My/Hello/To", $title[0])) {
$ok = ("(NL link)");
} else {
$ok = ("(INT link)");
}

I need to know if the sentence My/Hello/To appears in the
string, but I get this error on the /. Anyone has any suggestions?

Jeroen

    Hi,

    try following:

    if (preg_match ("#My/Hello/To#", $title[0])) { 
      $ok = ("(NL link)"); 
    } else { 
      $ok = ("(INT link)"); 
    } 

    wizkid

      That works ! 🙂
      Thanks, was that documented anywhere?
      I searched my head off ! 🙂

        Originally posted by jstraa
        That works ! 🙂
        Thanks, was that documented anywhere?
        I searched my head off ! 🙂

        Hi,

        I just looked here and didn't find anything. So I guess it isn't !?

        wizkid

          Write a Reply...