PHP code example of liron / simple-dict

1. Go to this page and download the library: Download liron/simple-dict library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

liron / simple-dict example snippets


// 简单替换
$replaced = $dict->replace("some text here...", "**");
// 高级替换
$replaced = $dict->replace("some text here...", function($word, $value) {
  return "[$word -> $value]";
});