Tagged: PHP

How to change default excerpt length in WordPress 0

How to change default excerpt length in WordPress

To do this you just need to add few lines of code in functions.php

You can replace value 50 according to your requirements. Here 99 is filter priority. You can read more about...

Mobile OS detection in PHP CodeIgniter 3

Mobile OS detection in PHP CodeIgniter

For doing this there is one good plugin called “Mobile Detect”. Just download library from https://github.com/serbanghita/Mobile-Detect Put Mobile_Detect.php inside libraries folder of ci application. Whenever you need to detect the OS or any other parameter, use following...

ci 2

Redirect to URL in CodeIgniter

This can be done by using URL Helper of CodeIgniter. This helper library should br loaded using the following code:

To redirect you just need to call function as follow:

See more...

Creating TimeAgo function in PHP 0

Creating TimeAgo function in PHP

Many times while displaying time on website we need to do something extra. This function script can give you time in days/hour/minutes/seconds ago format. You just need to pass the mysql time to this...