How-to articles, tricks, and solutions about FUNCTION

How to remove backslash on json_encode() function?

You can use the JSON_UNESCAPED_SLASHES option in the json_encode() function to prevent backslashes from being added to the JSON string.

How to Remove Empty Elements from an Array in Javascript

Read this tutorial and learn the method of removing empty elements from an Array. Also, read about removing falsy elements that include an empty string.

How to Remove Style Added with the .css() function Using jQuery

Read this tutorial and learn several ways of removing style added with the .css() function with the help of jQuery. Choose the best method for your case.

How to return 2 values from a Java method?

There are a few ways you can return multiple values from a Java method:

How to run a PHP function from an HTML form?

To run a PHP function from an HTML form, you will need to create an HTML form with the desired inputs, such as text fields and submit buttons.

How to Scroll to the Top of the Page Using JavaScript

Read this tutorial and find useful information about the simplest native JavaScript method and its parameters to make the page jump on the top instantly.

How to Sort an Array of Integers

Read this JavaScript tutorial and learn useful information about the logic of the sort() method which will help you sort an array of integers correctly.

How to Sort Array Alphabetically in JavaScript

Read this JavaScript tutorial and learn the two methods of sorting the elements of an array in alphabetical order based on the values of the elements.

How to Sort JavaScript Object by Key

In this JavaScript tutorial, you will read and learn information about a functional method of sorting an object by key supported by all major browsers.

How to Strip HTML from a String in JavaScript

In this tutorial, you will find several approaches to strippingan HTML from a sting in JavaScript easily. Get the codes and explanations right away.

How to Truncate a string in PHP to the word closest to a certain number of characters?

To truncate a string in PHP to the word closest to a certain number of characters, you can use the following code:

How to Use the func_get_arg() Function in PHP

In this snippet, we will demonstrate to you how to use one of the common PHP functions: func_get_arg().

How to Validate an Email with PHP

This tutorial explains how to validate an email using the PHP arsenal. Check out the examples of how to do that with the help of a PHP function and regex.

JavaScript: bind() vs apply() and call()

Read this JavaScript tutorial and learn about the main differences between the function prototype methods: bind(), call() and apply() and their usages.

Multiple excerpt lengths in wordpress

In WordPress, the length of the excerpt (the summary text displayed on the homepage or archive pages) can be controlled by the theme or by a plugin.

PHP append one array to another (not array_push or +)

To append one array to another in PHP, you can use the array_merge function.

Waiting Until All jQuery Ajax Requests are Done

Read this tutorial and learn useful information about the jQuery function that waits and then executes the function when all the ajax requests resolve.

What is JavaScript Version of Sleep()

The tutorial provides information about JavaScript version of the sleep() which makes the function pause execution for specified seconds of milliseconds.

What is the Difference Between Substr and Substring

Read this JavaScript tutorial and learn about the two String manipulation functions, namely, substr() and substring() methods and difference between them.

What is the naming convention in Python for variable and function?

In Python, variable and function names should be lowercase, with words separated by underscores.

1 2 3