PHP

The Regular Expressions are the easiest option to change the characters format based on the specific pattern. You can change the word format in a string using PHP with Regex. If you want to separate bunched words in a string, put a space in front of each word. Use the preg_replace() with Regex to insert space in front of uppercase character in a string using PHP.

By: CodexWorld Jan 2, 2019
PHP

Before taking any action with date input, it always a great idea to validate the date string. Date validation helps to check whether the provided string is a valid date format. Using the DateTime class you can easily check if the date string is valid in PHP. It is very useful for server-side validation of the date input using PHP.

By: CodexWorld Dec 28, 2018
PHP

In the web application, generally, the file is downloaded from the same server. But sometimes the file needs to be downloaded from the remote server. But sometimes the file needs to be downloaded from the remote server. Use the readfile() function with application/x-file-to-save Content-type header, to download a ZIP file from remote URL using PHP.

By: CodexWorld Jun 27, 2022

If you want to integrate copy to clipboard functionality on button click, JavaScript is the easiest option to do that. The HTML DOM execCommand() method provides a simple way to copy test to the clipboard. Use the copy command with document.execCommand() to copy text content to clipboard using JavaScript.

By: CodexWorld Dec 2, 2024

An API key is required to access Google Maps Geocoding API. You need to specify the API key in Geocoding API request. Go to the Google Cloud Platform Console and create a project to generate an API key for accessing Google Maps Geocoding API.

By: CodexWorld Dec 18, 2018

JavaScript replace() method search and replace the string with a specified value. Generally, JavaScript string replace() method replace only the first occurrence of a string. If you want to replace all the matching string from a string, Use replace() method with regular expression to replace all occurrences of a string in JavaScript.

By: CodexWorld Dec 4, 2018

Bootstrap Modal provides an easy way to display a dialog box on the web page. If you want to perform some functionality when the user closes the modal popup, you need to bind the function to Bootstrap modal close event. Use hide.bs.modal event to attach function to modal close event in Bootstrap using jQuery.

By: CodexWorld Nov 29, 2018

Hide element on click outside, is a must-have functionality for the dropdown menu. You can easily hide div or element when click outside of it using jQuery. Use jQuery mouseup event with target property to detect click event and hide div when clicking outside of the specific element.

By: CodexWorld Nov 23, 2018

Before submitting the selected files to the server-side script, it always a good idea to validate the number of files on the client-side. To implement client-side files number validation, you need to count the number of selected files. You can count selected files using JavaScript and jQuery.

By: CodexWorld Nov 14, 2018
keyboard_double_arrow_up