How to replace a letter in a string with a new letter that will not be updated

后端 未结 3 625
攒了一身酷
攒了一身酷 2020-12-12 02:08

Lets say I have some code:

$text = $_POST[\'secret\'];

$replaces = array(
        \'a\' => \'s\',
        \'b\' => \'n\',
        \'c\' => \'v\',
          


        
3条回答
  •  清歌不尽
    2020-12-12 02:11

    this will be your solution

       $text1 = '';
       for($i=0; $i

    or else you can use like this

    $text = strtr($text,$replaces);
    

提交回复
热议问题