Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.69 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. php strftime French characters
  2. setlocale(LC_ALL, 'fra_fra');
  3.        
  4. strftime('%d %B %Y', strtotime($post->post_date));
  5.        
  6. <meta charset="utf-8">
  7.        
  8. $date_string = utf8_encode(strftime('%d %B %Y', strtotime($post->post_date)));
  9.        
  10. header('Content-Type: text/html; charset=UTF-8');
  11.        
  12. <?php
  13. header('Content-Type: text/html; charset=UTF-8');
  14. //header('Content-Type: text/html; charset=ASCII');
  15.  
  16. $myDate = "Feb 23, 2011";
  17.  
  18. $locale = 'fr_FR.UTF-8';
  19. setlocale(LC_ALL, $locale);
  20. echo strftime('%d %B %Y', strtotime($myDate));  
  21.  
  22. $locale = 'en_US.UTF-8';
  23. setlocale(LC_ALL, $locale);
  24. echo strftime('%d %B %Y', strtotime($myDate));
  25. ?>
  26.        
  27. <meta http-equiv="content-type" content="text/html; charset=utf-8" />