How to format the day of the week to not show symbol in PHP

Asked

Viewed 64 times

4

How to exchange the symbol appearing on Tuesday by a C?

Ter�a-feira 22/08/2017 - bem vindo(a),

My code below:

<?php 
    setlocale(LC_ALL,"pt_BR", "pt_BR.utf-8", "portuguese" );
    date_default_timezone_set('America/Sao_Paulo');
    echo ucwords(strftime("%A "));
    $dt = date('d/m/Y', time());
    echo $dt;
?>
  • You must change the encoding of the ASCII site to UTF-8.

1 answer

6


In this case, just call the function utf8_encode

Thus remaining:

echo ucwords(utf8_encode(strftime("%A ")));
  • 2

    thanks! it worked!

  • @Robertoalexandredasilva If this answer has solved your problem and you have no further doubts about it, mark it as accepted/correct by clicking next to it. This will also mark your question as solved/solved.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.