admin

admin

PHP htmlspecialchars_decode() Function

The htmlspecialchars_decode() function converts some predefined HTML entities to characters. The htmlspecialchars_decode() function is the opposite of htmlspecialchars(). You may also like PHP html_entity_decode() Function and How to Encode and Decode URL Using PHP. Example <?php $str = “This is…

PHP scandir() Function

The scandir() function returns an array of files and directories of the specified directory. Required. Specifies the directory to be scanned and follow below example. You may also like How to Copy file from one folder to another folder using…

How to rename file using PHP

To rename a file, you use the rename() function. This function also allows you to move a file to a different directory. For example, to rename the test.txt file to test.bak file, you use the following code. You may also…

How to get file size in PHP

The filesize() function returns the size of the specified file. This function returns the file size in bytes on success or FALSE on failure with check below code. You may also like How to get file sizes KB, MB &…

How to get file sizes KB, MB & GB using PHP

Here’s the follow-up article on how to easily get file sizes nicely formatted. Below is a quick function that will display the file size in KB, MB, or GB all easily accessed through a function. You may also like How…

Multiple file upload in php

Sometimes we need to allow our users to upload multiple file upload. Today I am going to show you how to allow users to upload multiple files. It is almost similar like simple file upload but we need to do…

PHP htmlentities() Function

Generally, character encoding is done in various ways in PHP which provides many functions to perform these conversions, onto a given input string, from one form to another. You may also like PHP htmlspecialchars_decode() Function. Example <?php $str = ‘<a…

PHP html_entity_decode() Function

The html_entity_decode() function is used to convert all HTML entities to their applicable characters. The html_entity_decode() function is the opposite of htmlentities(). You may also like PHP htmlspecialchars_decode() Function. Example <?php $str = ‘&lt;a href=&quot;https://scriptsgurus.com&quot;&gt;scriptsgurus.com&lt;/a&gt;’; echo html_entity_decode($str); ?> Output <a…

PHP hex2bin() Function

The PHP hex2bin() function is used to decode a hexadecimally encoded binary string. In other words, you can use this function to convert a string of hexadecimal values to ASCII characters. You may also like PHP convert_uuencode() Function and How…