note 71451 deleted from function.explode by colder
| From: | colder@php.net | Date: | Tue, 09 Jan 2007 10:28:25 +0000 |
| Subject: | note 71451 deleted from function.explode by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121482@lists.php.net to get a copy of this message | ||
Note Submitter: specting at smsgratis dot es
----
Function to remove the characters between '"'
Get the phone numbers in a array
$input ='"toñi " <(34)9169875656>;"Perez, Maria"
<(34)64681220>,"Paez, Javier " <(34)67394811>';
$tempa = explode('"', $input);
$temps = $tempa[0];
for ($i=2;$i<count($tempa);$i++) {
$c = $i % 2;
if ($c == 0) {$temps .= $tempa[$i];}
}
echo "$temps<br>";
$contact_list = split( '[;,]', $temps);
for ($i=0;$i<count($contact_list);$i++) {
echo $contact_list[$i]."<br>";
}