Jump to content

sonkan

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • First Name
    sonkan
  • Last Name
    bayrakdar

sonkan's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. <?php date_default_timezone_set('Europe/Istanbul'); function modified_date( $date ){ $time_difference = time() - $date; $second = round( $time_difference ); $minute = round( $time_difference/60 ); $hour = round( $time_difference/3600 ); $day = round( $time_difference/86400 ); $week = round( $time_difference/604800 ); $month = round( $time_difference/2419200 ); $year = round( $time_difference/29030400 ); if( $second <= 59 ){ if( $second == 0 ){ return 'Şimdi yazıldı'; }else{ return $second . ' saniye önce, '; } }else if( $minute <= 59 ){ return $minute . ' dakika önce, '; }else if( $hour <= 23 ){ return $hour . ' saat önce, '; }else if( $day <= 6 ){ return $day . ' gün önce, '; }else if( $week <= 3 ){ return $week . ' hafta önce, '; }else if( $month <= 11 ){ return $month . ' ay önce, '; }else{ return $year . ' yıl önce, '; } } echo modified_date(''.$tpl['zaman'].''). date('d ', ''.$tpl['zaman'].'');?><?php setlocale(LC_ALL,"turkish"); echo "".strftime("%B", ''.$tpl['zaman'].'');?><?php echo date(' Y', ''.$tpl['zaman'].''); setlocale(LC_ALL,"turkish"); echo "".strftime(" %A ", ''.$tpl['zaman'].''); echo " - ".date(' H:i:s ', ''.$tpl['zaman'].''), "yayınlandı."; ?> Arkadaşlar bu kod başka yerde de var "function modified_date( $date ){" modified_date id koymamız gerekiyor diğer benzer modified_date ler ile çakışıyor Örnek : function modified_date0( $date ){ function modified_date1( $date ){ function modified_date2( $date ){ bunu nasıl sağlayabiliriz sorunum buradaki örneğe benziyor https://www.prestashop.com/forums/topic/264098-fatal-error-cannot-redeclare-p-previously-declared-in/
×
×
  • Create New...