List Info

Thread: note 71451 added to function.explode




note 71451 added to function.explode
user name
2006-11-29 20:23:09
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 -- htt
p://www.php.net/manual/en/function.explode.php
Edit        -- https://master
.php.net/note/edit/71451
Del: integrated  -- h
ttps://master.php.net/note/delete/71451/integrated
Del: useless     -- http
s://master.php.net/note/delete/71451/useless
Del: bad code    -- htt
ps://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     -- http
s://master.php.net/note/delete/71451/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/71451
Reject      -- https://mast
er.php.net/note/reject/71451
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )