<?php
$string="0:1027301|pe_id:1027301|1:ko ben|NAME:ko
ben|2:0555532963|PHONE2:0555532963|3:07711111|PHONE1:07711111|";
echo $value=preg_replace('/[^0-9]+/', '', stristr(stristr($string, 'PHONE2'),'|',true));
?>
we use 3 functions ( 2 times stristr() and preg_replace()
search value of PHONE2:0555532963
No hay comentarios:
Publicar un comentario