Practical solutions

PHP Howtos How-To Guides

Solve the problem. Keep building. Collection of PHP how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

Session ID in PHPThis article will teach you how to work with PHP Session id. You will learn how to start and check for session ids using session_start() and session_id() PHP cURL File UploadThis tutorial demonstrates the complete execution of uploading curl file in PHP. PHP Video PlayerThis tutorial demonstrates how to create a video player in PHP. PHP Artisan Clear CacheThis tutorial demonstrates how to clear cache using artisan in Laravel PHP. PHP Anonymous ClassThis tutorial demonstrates how to create and use an anonymous class in PHP. PHP Spread OperatorThis tutorial demonstrates the spread operator in PHP. PHP Socket IOThis tutorial demonstrates how to implement socket.io in PHP. New York Timezone in PHPThis tutorial demonstrates how to get the time in new york timezone in PHP. Warning: Php_network_getaddresses: Getaddrinfo Failed: No Such Host Is KnownThis article shows solution for the php_network_getaddresses: getaddrinfo failed warning in PHP. this and self in PHPThis tutorial explains what OOP is, and how and when to use this and self in your PHP code. 8 Best PHP Code ObfuscatorsThis tutorial demonstrates the eight best code obfuscators in PHP. Static Variables in PHPThis article will give you a clear overview on static variable in PHP. Null Coalescing vs Elvis Operator in PHPThis article will describe the difference between Elvis operator and Null coalescing operator Method Overloading in PHPThis tutorial introduces method overloading in PHP. cURL GET Request Using PHPThis tutorial explains and details how to carry out GET request operations in PHP using cURL. Different Ways to Compare Dates in PHPcompare dates in php with strtotime(), time(), date() and DateTime object PHP PaginationThis tutorial introduces how to paginate the database rows in PHP Lambda Functions in PHPThis tutorial demonstrates how to use lambda or anonymous functions in PHP. PHP Error HandlersIn this tutorial, we will introduce the PHP Error Handling. We will cover the importance of error handling on PHP and how it works. Encode Image to Base64 in PHPThis article will teach you how to encode image to base64 in PHP. You'll use a combination of functions like pathinfo, file_get_contents, base64_encode, and mime_content_type in PHP. PHP Switch Version on UbuntuThis tutorial demonstrates how to switch PHP versions of Ubuntu using the command line. PHP Private FunctionThis tutorial demonstrates how to create and use private functions in PHP. Performance and Readability of for Loop and foreach Loop in PHPIn this article, we compared a for loop and foreach based on execution speed and readability. In most cases, the for loop has better readability and executes faster than the foreach loop. PHP With AjaxThis article explains how to use PHP with Ajax.