example - ideone
$output ="";
$semana = array(
'1' => 'Segunda-Feira',
'2' => 'Terca-Feira',
'3' => 'Quarta-Feira',
'4' => 'Quinta-Feira',
'5' => 'Sexta-Feira',
'6' => 'Sábado',
'7' => 'Domingo'
);
$a = array_slice($semana, date('w') - 1 );
$b = array_slice($semana, 0 , date('w') - 1 );
$c = array_merge_recursive( $a , $b );
foreach( $c as $key => $value ) {
$output = $output . '<div class="dia-semana"><div class="dial">'. $value . "</div></div>" ;
}
$result = '<div class="base-semana">'.$output.'</div>' ;
echo $result;
$ a = returns the sequence of all $ week elements from [date ('w') - 1], where date ('w') is the numeric representation of the day of the week.
$ b = returns the sequence of the array elements $ week from zero to [date ('w') - 1], with date ('w') being the numeric representation of the day of the week.
$ c = fuse the elements of $ a with the $ b array so that the elements of $ b are placed at the end of the $ a array.
To set the result according to Brasília time instead of server time, place this line date_default_timezone_set('America/Sao_Paulo');
at the beginning of PHP. Reference - date_default_timezone_set