PHP code example of bbear / tools
1. Go to this page and download the library: Download bbear/tools 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/ */
bbear / tools example snippets
use BBear\Tools\Base\Tools;
$str = '~!@#$%^&*()_+ asdasdzxc啊哦哦';
$enStr = Tools::sEncode($str);
$deStr = Tools::sDecode($enStr);
echo $str . "\n";
echo $enStr . "\n";
echo $deStr . "\n";
var_dump( $str === $deStr);
除第一个参数是数组 其他与page相同
$C = array();
$C[] = 12;
$C[] = 4;
$C[] = 20;
$C[] = 5;
print_r( Tools::multiPage($C , 1 , 50) );