HTML <a> tag is used to open URL in the same window and tab. If you want to open URL with JavaScript, window.open() method allows opening URL in the browser tab or window. You can use _self value in the second parameter of the window.open() method to open URL in the same tab and in the same window with JavaScript.

By: CodexWorld Apr 15, 2023
PHP

Timezone conversion to a specific timezone helps to synchronize different DateTime. It is very useful to balance the server time and the user’s local time. PHP DateTime class provides an easy way to convert a date time stamp to UTC. You can convert any timezone to UTC DateTime using PHP.

By: CodexWorld Oct 2, 2023
PHP

To get only the name of a file, the extension needs to be removed from the filename. You can remove the extension from a filename with PHP. There is a number of ways to remove extension from a string using PHP. In the following example code, we will show you all the possible ways to remove the extension from the filename and extract the original name of the file in PHP.

By: CodexWorld Apr 15, 2021

Regular Expression (RegEx) is the easiest way to trim a specific character from a string in JavaScript. Use the JavaScript replace() method with RegEx to remove a specific character from the string. The example code snippet helps to remove comma (,) characters from the start and end of the string using JavaScript.

By: CodexWorld Apr 14, 2021

The Validator class helps to validate input fields in Laravel. There are various validation rules available to validate fields. The required_without validation rule is used to check whether one of the other fields must be present and not empty. Use the required_without rule in Laravel Validation, to validate one of two fields must be filled.

By: CodexWorld Apr 14, 2021

The browser’s back button allows the user to redirect back to the previous page that accessing before the current page. If you want to restrict users to back the previous page on your web application, the browser back button needs to be disabled. The browser’s back navigation can be disabled with JavaScript.

By: CodexWorld Mar 19, 2021
PHP

HTML meta tags are used to provide structured metadata about an HTML document. Mostly, 3 meta elements are used to specify the metadata for the web page, title, description, and keywords. The information from the meta tags can be fetched using PHP.

By: CodexWorld Feb 22, 2021

MySQL RAND() function provides an easy way to select random rows from the table. You can get random records from the database using a single SQL query in MySQL. If you want to list the unique data on each page load, the random records feature is very useful. Use MySQL RAND() function to select random records from the table.

By: CodexWorld Jun 29, 2020

JavaScript toLocaleString() method provides an easy way to convert date to a specific format. You can change the date format as per your needs using JavaScript. Use toLocaleString() method to convert date to a specific format in JavaScript.

By: CodexWorld Mar 26, 2020
keyboard_double_arrow_up