FreePgs.com Forum
June 27, 2022, 11:26:09 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The "Support Requests" forum is now viewable by guests.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: STR_REPLACE doing weird things.  (Read 3837 times)
sixthcrusifix
Sage
Verified Account
Sr. Member
*

Karma: +0/-3
Offline Offline

Posts: 445


http://sixthcrusifix.com/home/

Blog entries (0)

View Profile WWW
« on: December 02, 2005, 12:52:59 AM »

I'm using it to translate albhead to english with this:

$letters2 = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
$letters1 = array("Y","P","L","T","A","V","K","R","E","Z","G","M","S","H","U","B","X","N","C","D","I","J","F","Q","O","W");
$msg2 = str_replace($letters2,$letters1,$msg);
strtolower($msg2);
echo ($msg2);

First of all I have to use one uppercase and one lower or nothing works.

Secondly is you type in a few words it works, but if you type in a whole paragraph some of the letters are mistranslated and show the wrong replacement letter. Why is this??
Logged

Visite me website at http://www.sixthcrusifix.com
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!