function Buscar($str,$num) { $valores= explode(",",$num); for($i=0;$i<count($valores);$i++) if($valores[$i]==$num) return $i; }