[SOLVED] Strpos() not detecting less than character (<)
Posted: Tue Mar 27, 2007 9:01 am
I have an array which contains the parse of an e-mail address from a .EML file. Each element looks like the following:
1) "'Namea'"<Namea@x.com>
2) "'Nameb'"<Nameb@x.com>
3) "'Namec'"<namec@entagroup.com>
I want to extract the e-mail address from each of those elements so I have the following code:
But the $start nor $end elements are being filled.
Any idea for this?
Regards,
1) "'Namea'"<Namea@x.com>
2) "'Nameb'"<Nameb@x.com>
3) "'Namec'"<namec@entagroup.com>
I want to extract the e-mail address from each of those elements so I have the following code:
Code: Select all
foreach($toSplit as $a) {
$b[$i] = str_replace(" ", "", $a);
$start[$i] = strpos("<", $b[$i]);
$end[$i] = strpos(">", $b[$i]);
$output[$i] = substr($b, $start[$i], $end[$i]);
$i++;
}Any idea for this?
Regards,