This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// PHP Máscara CNPJ, CPF, Data e qualquer outra coisa | |
// http://blog.clares.com.br/php-mascara-cnpj-cpf-data-e-qualquer-outra-coisa/ | |
// ver em funcionamento ~~> https://ideone.com/wP7zN2 | |
function mask($val, $mask) | |
{ | |
$maskared = ''; | |
$k = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# colour-formatted print_r shortcut | |
if ( ! function_exists('prd')){ | |
function prd($object,$die=TRUE){ | |
# insert span tags | |
$output = '<span class="die_value">'.$output; | |
$output = str_replace('[', '<span class="die_key">[', print_r($object,TRUE)); | |
$output = str_replace(']', ']</span>', $output); | |
$output = str_replace('=> ', '=> <span class="die_value">', $output); |