Top menu

How to truncate String by Words

If you simply want to truncate text to a certain number of words, because you do not want a word will be cut, the code below will do the trick:

 

0

Add param in URL

In the function below, I will show you how to add a parameter in URL by treating all possible cases : first check whether the parameter is already defined in the URL so that we can just update it if parameter is already defined in the URL, so replace the parameter value, rather than append […]

0