raminhos
raminhos
Reputation Top 5%
Rafael Ramos
2 Snippets  (222nd place)
Published
0 Channels
Created
2 Channels
Following
51 points  (599th place)
Reputation
Junior Code Generator
Junior Publisher
Junior Popular Coder
Junior Autobiographer
Serious Autobiographer
Senior Autobiographer
Junior Famous Coder

Recent Snippets See all snippets by raminhos

public by raminhos  1805  1  6  0

Just Trim

function justtrim($string, $lenght){
  //$lenght = 22;
  $str_to_count = html_entity_decode($string);
  if (strlen($str_to_count) <= $lenght) {
    return $string;
  }
  $s2 = substr($str_to_count, 0, $lenght - 3);
  $s2 .= "..";
  return $s2;
}
;

public by raminhos  2341  0  5  0

msg_success

function msg_success($txt, $s){
?>
<div class="space-<?=$s?>"></div>
<div class="alert alert-success">
    <button type="button" class="close" data-dismiss="alert">
        <i class="icon-remove"></i>
    </button>
    <i class="icon-ok"></i> <strong>Sucesso!!! </strong> <?=$txt?>
</div>
<?
}
;