code php ajout heure
try
{
$bdd = new PDO('mysql:host=localhost;dbname=forum;charset=utf8', 'root', 'root', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
}
catch (Exception $e)
{
die('Erreur : ' . $e->getMessage());
}
return $bdd;#TA DATE MAINTENANT
$my_date=date("Y-m-d H:i:s");
#TA DATE EN TIME
$my_date_time=time("Y-m-d H:i:s");
#TU AJOUTES LE NOMBRE DE SECONDE DESIRE (ici 1h30 = 5400 secondes)
$my_new_date_time=$my_date_time+5400;
#TU REPASSE EN FORMAT DATE
$my_new_date=date("Y-m-d H:i:s",$my_new_date_time);
Also in PHP:
- date print in php
- PHP Password Generator
- contains the symbol php
- current date timestamp in php
- check word is in string php
- day of week count in php
- composer require guzzlehttp/guzzle
- .lenght en php string
- date() php getting out
- date to timestamp in php
- case upper php
- Laravel Mix npm run production error
- console log php inside string
- /phpspreadsheet 1.15.0 requires ext-dom * centos yum
- - phpunit/phpunit[8.5.0, ..., 8.5.x-dev] require ext-dom * ->
- clear laravel storage cache
- Class 'App\Http\Controllers\Admin\Route' not found
- PHP Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /var/www/html/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
- array_unique multidimensional php
- convert byte to megabyte php
- failed to open stream: no such file or directory php
- echo errors of php
- array_key_exists() WORDPRESS
- find string length php