<? function split_addresses($addr) { $ad = array(); $ad = split(",",$addr); return $ad; }
$tos=array(); $to = " abcd <[EMAIL PROTECTED]>, efgh <[EMAIL PROTECTED]>"; $tos=split_addresses($to); echo $tos[1]; ?> echos efgh <[EMAIL PROTECTED]> ?? Whats the problem? Maybe you output to a browser and don't see <[EMAIL PROTECTED]> cause its between <> Op zondag 08 september 2002 10:17, schreef N. Pari Purna Chand: > I have a string > $to = " abcd <[EMAIL PROTECTED]>, efgh <[EMAIL PROTECTED]>" ; > > I want a function returning an array of > indivial names+mailids like from the $to seperated by "," > something like > $tos[0] = "abcd <[EMAIL PROTECTED]>"; > $tos[1] = "efgh <[EMAIL PROTECTED]>"; > > Now split() in the following function*** is notworking as needed. > ie, I'm getting > $tos[0] = "abcd"; > $tos[1] = "efgh"; > > Not the complete name + <mailid>, > Why ? > /Chandu > > *** > function split_addresses($addr) { > $ad = array(); > $ad = split(",",$addr); > return $ad; > } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php