Jump to content

trying to find a spanish word in a string


dennismonsewicz

Recommended Posts

I am trying to do a find and replace of a spanish word in a string but can't get it to work...

 

$tele_array = array('teléfonos', 'teléfono');
				$apar_array = array('aparatos', 'aparato');

				if($culture == 'es-US' && $id == 1) {
					if(strstr($answer, 'teléfonos')) {
						echo 'Found it!';
						$answer = str_replace($tele_array, $apar_array, $answer);
					}	
				}

 

the echo statement does not display and the rest of the script continues. Any thoughts?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.