Ano kaya possible error po?
Thanks po sa makasagot
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
Hello! To assist you accurately and effectively, I'll need more information about your problem. Please provide details such as:
1. What programming language are you using?
2. Can you provide the code that is causing the problem?
3. Have you received any error messages? If so, what do they say?
4. What were you trying to accomplish with your code?
Don't worry, I'm here to help you. We just need more context to solve this issue.
Thank you for providing additional information. The error you're encountering is because1.PHP MySQL
2.
<div class="container">
<i class="icon-calendar icon-large"></i>
<?php
$Today = date('y:m:d',mktime());
$new = date('l, F d, Y', strtotime($Today));
echo $new;
?><br><br>
3. Fatal error: Uncaught ArgumentCountError: mktime() expects at least 1 argument, 0 given in C:\xampp\htdocs\pharmacy-mgmt-php-master\home.php:238 Stack trace: #0 C:\xampp\htdocs\pharmacy-mgmt-php-master\home.php(238): mktime() #1 {main} thrown in C:\xampp\htdocs\pharmacy-mgmt-php-master\home.php on line 238
4. I want my home page to run smoothly without errors
mktime()
function expects at least one argument but you are not providing any. mktime()
function in PHP is used to return the Unix timestamp for a date. It expects up to six parameters representing the hour, minute, second, month, day, and year respectively. If no parameters are given, the function will return a timestamp for the current time.mktime()
at all. You can simply use the date()
function. <div class="container">
<i class="icon-calendar icon-large"></i>
<?php
$Today = date('y:m:d');
$new = date('l, F d, Y', strtotime($Today));
echo $new;
?><br><br>
date('y:m:d')
will return the current date in 'year:month:day' format, and strtotime($Today)
will convert this date string into a Unix timestamp which is used by the second date()
function to output the date in the 'Day, Month day, Year' format.