I need to print result of function date('d-m-y H:i:s', $time)
on two lines like this:
26-11-2019
10:00:02
I try to add <br/>
between 'd-m-y' AND 'H:i:s' doesn't help.
Try this:
echo nl2br(date("d-m-y\nH:i:s", $time));
Note that I used double quotes instead of single quotes. This is because \n won't work with single quotes. For your reference: https://www.php.net/manual/en/function.nl2br.php What is the difference between single-quoted and double-quoted strings in PHP?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With