Ver Mensaje Individual
  #4 (permalink)  
Antiguo 31/07/2009, 09:35
pochos
 
Fecha de Ingreso: julio-2009
Mensajes: 72
Antigüedad: 17 años, 3 meses
Puntos: 16
Respuesta: Buscar una mayuscula dentro de una palabra

prueba esto...

Código PHP:
$string = "El Coche es RojoThe Car is Red";
$i = 0;
$maxleng = strlen($string)-1;

for(
$i=0;$i < $maxleng ;$i++){
    if((
$string[$i] == strtoupper($string[$i])) && ($string[$i-1] != ' ') && ($string[$i] != ' ') && $i != 0){
        
$pos_ini_ingles = $i;
        break;
    }
}

$texto_espanol = substr ($string , 0 , $pos_ini_ingles);
$texto_ingles = substr ($string , $pos_ini_ingles, $maxleng); 
te sirve?? quizas haya que hacer algunas modificaciones pero creo que es la idea