Re: [PHP] Regex in PHP

2008-06-03 Thread Liran Oz
You can use this: $str = '[EMAIL PROTECTED]'; preg_match('/[EMAIL PROTECTED]@(.+)/', $str, $matches); var_dump($matches);//will be in $matches[1] Or without regex: echo substr($str, strpos($str, '@')+1); Liran - Original Message - From: "VamVan" <[EMAIL PROTECTED]> To: Sent: We

Re: [PHP] function returns no value

2008-04-20 Thread Liran Oz
Can't really know without the rest of the code. Check if the function really returns and not Dying (Add some messege like: die("help me I'm dying"); ). Also use print_r or something like to see what's inside the fields array. it is possible that it's an associative array and you are using the w