php strftime French characters

前端 未结 9 1474
眼角桃花
眼角桃花 2020-12-08 10:08

I\'m working on a site where the user can switch between English and French. To output the date of posts.

If the user chooses French I use:

setlocale         


        
9条回答
  •  无人及你
    2020-12-08 10:40

    I think you can use the function:

    echo utf8_encode(strftime('%d %B %Y', strtotime($post->post_date)))

提交回复
热议问题