Skip to content

Instantly share code, notes, and snippets.

@YuriFontella
Created April 23, 2015 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YuriFontella/e6afae3caf1cfe7e87d5 to your computer and use it in GitHub Desktop.
Save YuriFontella/e6afae3caf1cfe7e87d5 to your computer and use it in GitHub Desktop.
foreach
<?php
public static function publics_slide()
{
$query = DB::select()
->from('publics')
->limit(4)
->execute();
foreach($query as $row)
{
$row['descricao'] = Str::truncate($row['descricao'], 10);
}
return $query->as_array();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment