Jump to content

Moorcam

Members
  • Posts

    274
  • Joined

  • Last visited

  • Days Won

    1

Moorcam last won the day on January 8

Moorcam had the most liked content!

1 Follower

About Moorcam

  • Birthday 02/12/1971

Contact Methods

  • Website URL
    https://www.moorcam.com.au

Profile Information

  • Gender
    Male
  • Location
    Victoria, Australia
  • Interests
    Coding, driving large heavy vehicles.
  • Age
    53

Recent Profile Visitors

5,293 profile views

Moorcam's Achievements

Advanced Member

Advanced Member (4/5)

6

Reputation

13

Community Answers

  1. Why do Java developers wear glasses? Because they don’t C#!
  2. Welcome Jerry!
  3. Place your code insode code blocks. Like so... Code here...
  4. You need to ensure that $fdw is initialized properly before it is used. $fdw is expected to hold a date string, but if it is not initialized before the form is submitted, the DateTime constructor will throw an error. What does your error logs say?
  5. Just a thought here. Are the teachers and supervisors saved as an Array in the database? If they are, this could be the issue because PHP has issues displaying data to a certain user based on ID or username or whatever because it also retrieves the data from the database including the [""], for example, ["teacher"], ["supervisor"]. Just a thought.
  6. You will be best contacting your hosting provider as it could be a combination of different things. But as was stated, the error is indicating that the username or password or both are wrong. It could also be a privilege issue or a misconfigured PhpMyAdmin.
  7. Let’s settle a debate that’s been raging (in my head, at least) for years: What’s the best PHP IDE or framework? Personally, I’ve hopped around like a caffeinated squirrel trying to find "the one." VS Code is my current IDE of choice because extensions are basically cheat codes for lazy developers like me. But I still have a soft spot for PHPStorm—despite it being the IDE equivalent of a luxury car. Sure, it’s fast and powerful, but does it have to cost as much as my coffee addiction? As for frameworks, I’ve dabbled with Laravel, Symfony, and CodeIgniter. Laravel feels like PHP on training wheels—smooth, elegant, and ready to do the heavy lifting. Symfony, on the other hand, is like the DIY kit of frameworks: powerful but occasionally makes you question your life choices. And CodeIgniter? It’s the scrappy underdog that still gets the job done when you just need something lightweight. However, I still love it raw like my steaks! (not really). So, here’s what I want to know from you: IDE or Editor: Do you swear by VS Code, dream in PHPStorm, or bravely code in Notepad++? Framework: Are you a Laravel evangelist, a Symfony purist, or a CodeIgniter minimalist? Or are you a rebel coding in plain PHP and laughing in the face of frameworks? Bonus points for any funny stories—like the time you spent 2 hours debugging only to find out you forgot a semicolon (we’ve all been there. Like me just today). Let’s hear it! Enlighten me, entertain me, and most importantly, help me justify my next subscription or Lucozade binge. Cheers! Dan
  8. Hi, I am Dan. I’ve been designing web applications—on and off—since 2001, back when animated GIFs were all the rage and ‘responsive design’ meant answering your client’s emails. Over the past 14 years, I’ve tried to keep pace with the ever-evolving trends in web development, successfully delivering a variety of projects that made my clients happy (and kept me caffeinated). I specialize in PHP development, including experience with MySQLi and PDO for database integration, and I’m well-versed in JavaScript (both vanilla and frameworks like jQuery), Python, and more. Whether it’s building efficient back-end systems, creating dynamic front-end experiences, or troubleshooting complex issues, I’m always up for a challenge. Need custom work done? Pop me an email—let’s make something awesome together! [email protected] My website: www.danoriordan.com
  9. That's ok. We all learn as we go along As Barand said above, the syntax you need is in the foreach loop. Try this. Replace your function list_holidays with this: function list_holidays(DateTimeInterface $date): bool { $year = (int) $date->format('Y'); foreach (get_holidays($year) as $holiday_name => $holiday_date) { $holiday_formatted = $holiday_date->format('Y-m-d'); echo "$holiday_name is $holiday_formatted\n"; } return true; // Added return statement for consistency } Look at the code above, get familiar with what it does. That's how you learn. We are now using the foreach loop to retrieve the holiday name and holiday date. This should now output in the way you want. See how it goes Doing a quick Google (we all know Dr. Google knows everything, right?) It explains what a foreach loop is:
  10. Oh ok. I thought it was something you created yourself. You will probably need to contact the developer to help you resolve it. It's a premium script so free support comes with it.
  11. Congratulations, you've just entered a world where semicolons make or break friendships, and "Hello, World!" is always the first step toward global domination (or at least functional code). Feel free to dive into discussions, share your bugs (we won't squash them... immediately), and remember: there’s no such thing as a dumb question—just infinite ways to ask it! Happy coding, and may your syntax always be error-free!
  12. The loop iterates over the holidays array, but it does not access the keys (holiday names) associated with the DateTime objects. Modify the foreach loop in the list_holidays function to include both the holiday names and their corresponding dates.
  13. Hi. Without the actual script it's hard to pinpoint what the error is telling you. In plain English it's telling you that the format is not supported or isn't found. But it could be due to many other reasons.
  14. You can add a usort function, which sorts the $files1 array based on the modification time of each file. Something like this: usort($files1, function($a, $b) { return filemtime($b) - filemtime($a); }); I would also recommend using htmlspecialchars for added security. Hope this helps.
  15. I'm no expert but the error you are getting is indicating that you may need to login to Docker or the repo doesn't exist. Check the repo name and your access rights, I guess.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.