Pinned content
View all 3 collectionsPHP admins have deemed these posts noteworthy.
Common Mistakes to Avoid in PHP
Start learning PHP — Useful resources for beginners and advanced
Can you answer these questions?
View all unanswered questionsThese questions still don't have an answer
PHP code issue causing grid container and bootstrap 5 cards (grid-items) not to render on web-page loading?
Has anyone successfully managed to configure a PHP class method to retrieve a CheckoutId for a Sumup Payment Widget
PHP exec() command not working as expected
Exclude products with specific metadata from WooCommerce recent products widget
Laravel Socialite Google OAuth with Sanctum: Session created but user_id is null after login
Looking for an extra challenge?
View all bountied questionsThese questions have a bounty on them
Laravel 11 Artisan lang:publish generates empty lang folder
How can I post via API to a Facebook Page without having my "Facebook App" suspended/deleted?
Recommended answers
View all recommended answersThese answers have been recommended
Seeding value in PHP
Seeding means providing the initial state. Every time you seed with the same number, you will get the same set of pseudo-random numbers, no matter what machine you run it on. You can think of it as ...
filter_input always returns null [duplicate]
You manually set $_GET['c1'] in your test script within a loop and then trying to get it with filter_input. Since filter_input fetches the data from the original HTTP request, it doesn't recognize ...
Use different .env file for Laravel application?
I'm not sure this approach works,( without testing). We used this to map other files/folders into the project. It is the same theory you can use, too services: app: env_file: - "...
php time round up & round down
If you want something fully flexible where you can choose the rounding interval and the direction, you can pass these options in as arguments to the function, perhaps like this: function roundTime($...
imagemagick (legacy) center, resize, move, crop watermark
I managed to cobble something together that more-or-less does the job. It reads the image files from the server, and stores the output on the server as well. It looks like this: function ...
See what's trending
View all trending questionsThese are the most active questions in PHP Collective
How can I prevent SQL injection in PHP?
How do I check if a string contains a specific word?
Reference Guide: What does this symbol mean in PHP? (PHP Syntax)
How do I get a YouTube video thumbnail from the YouTube API?
Deleting an element from an array in PHP
Understanding the final Keyword in PHP: Preventing Inheritance and Overriding
How to trim (or non-breaking space) in PHP?
Evolution of Type Declarations in PHP
Start learning PHP — Useful resources for beginners and advanced
Simply submit a proposal, get it approved, and publish it.
See how the process works