PHP Tutorials and Tips

PHP is a web programming language that you can use for building dynamic websites and web applications. In this section, you can find PHP tutorials and tips to improve your knowledge about coding with PHP.

How to Create a Text File With PHP

You can easily create text files from the server side with the help of a scripting language such as PHP. In this tutorial, I will show you how to create text files with PHP by providing some simple examples. Read more...

Dynamic Facebook Like Button Code with PHP

Placing a single Facebook Like button on a static HTML website is rather straightforward; however, it may get a little complicated when it comes to placing Like buttons on web pages that are dynamically generated with PHP. This tutorial will demonstrate how to do that. Read more...

How to Download an External File with PHP

It is possible to download a file that is hosted on another website/server to your server or to the user's computer with the help of a simple PHP script. In this tutorial, I will demonstrate how to download an external file using PHP. Read more...

Facebook Share Button Code with PHP

You can create your own custom Facebook share buttons which use dynamic URLs of your web pages with the help of a server side programming language. In this tutorial, I will show you how to create a share button for non-static URLs using PHP. Read more...

How to Delete a Cookie with PHP

Just like you can create a cookie with PHP, you can also delete it. In this tutorial, I will show you how to delete a cookie that you previously stored on the user's device, with the help of a simple PHP script. Read more...

How to Create a Cookie with PHP

One of the methods for creating and saving HTTP cookies on the user's device is to do it with PHP, that is, if your website or application is built with PHP. In this tutorial, I will briefly demonstrate how to create a cookie using PHP. Read more...

How to Create a ZIP Archive with PHP

You can programmatically create Zip archives in your PHP web application or website using the functionality of one of the compression and archive extensions such as the Zip extension. In this tutorial, I will demonstrate how to create a Zip archive with PHP. Read more...

How to Download a File with PHP

You can do a lot of things with PHP scripts, including the automatically downloading of files that are stored on your server. In this tutorial, I will talk about how to download a file from your website using PHP. Read more...

How to Include PHP Variables in JavaScript

Combining PHP and JavaScript shouldn't scare you, because in some cases you may need to pass PHP variables to JavaScript in order to accomplish certain tasks in your applications. In this tutorial, I will show you how to include PHP variables in JavaScript by giving some examples. Read more...

How to Get All Files and Folders in a Folder with PHP

In this tutorial, I will show you how to get all the files, subfolders and files in subfolders within a folder recursively using PHP, with the help of a detailed example. Read more...