Sunday, October 30th, 2011
I needed to add a fixed position widget on the side bar so that it stays at it's position no matter page scroll or not, I have searched around to find a plugin to do that but cannot find any good solution, i have achieved that by playing a bit ...
Posted in CSS, Javascript, Jquery, Wordpress | No Comments »
Tuesday, October 18th, 2011
Sometime you may need to find position of a character in a string, charAt() string method comes in for the purpose.
For instance, when you execute the following code;
var mystr = 'I am a test String.';
document.write(mystr.charAt(3)); // Result will be 'm'
Posted in Javascript | No Comments »
Monday, October 17th, 2011
You may need to remove (strip) HTML from your data to get plain text, For the purpose PHP has a built-in function strip_tags(), Basic syntax is as below
Posted in PHP, Tutorials | No Comments »
Monday, August 22nd, 2011
If you want to sort arrays in PHP in ascending / descending order by array values, you may use the following code snippets.
First lets create an array;
$array = array("Red", "Green", "Blue", "Yellow", "White", "Black");
Now lets use PHP's built-in function sort() that will sort the array by values in ascending order.
Posted in Tutorials | No Comments »