note 71451 added to function.explode

From: Date: Wed, 29 Nov 2006 20:23:09 +0000
Subject: note 71451 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-120165@lists.php.net to get a copy of this message
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>"; } ---- Server IP: 130.206.1.5 Probable Submitter: 80.39.203.47 ---- Manual Page -- http://www.php.net/manual/en/function.explode.php Edit -- https://master.php.net/note/edit/71451 Del: integrated -- https://master.php.net/note/delete/71451/integrated Del: useless -- https://master.php.net/note/delete/71451/useless Del: bad code -- https://master.php.net/note/delete/71451/bad+code Del: spam -- https://master.php.net/note/delete/71451/spam Del: non-english -- https://master.php.net/note/delete/71451/non-english Del: in docs -- https://master.php.net/note/delete/71451/in+docs Del: other reasons-- https://master.php.net/note/delete/71451 Reject -- https://master.php.net/note/reject/71451 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120165) next »