Categories
PHP / MySQL

How to count the number of items in a PHP array ?

Here is my Array with some stuff What if you need to count the number of array members, we can achieve this with PHP function called count(). How to Use: What about a recursive count for multidimensional arrays? Well, it works in a very similar way, only we must specify the COUNT_RECURSIVE parameter Example :

Categories
CodeIgniter

CodeIgniter : One Controller to Rule all Methods(page)

Today, we are Going to Use Codeigniter URI Segments to rule all Methods within the controller, means one Controller will load views based on the URI segments, This method is best for static sites that don’t require a controller for every page and also we can set a 404 view when nothing is found. Currently […]

Categories
Css HTML & HTML5

HTML5 shiv on Google CDN

Just for Quick copy past

Categories
Css

Cross Browser Opacity Hack

Below snippets will set the opacity of the elements and its children.

Categories
JQuery

Smooth scrolling to top of page

When the size of web page increases, it’s better to have a button to scroll to the top of the page with a single click. How to add Smooth scrolling: Blow simple js script will allow your visitors to smooth scroll to the top of the page simply by clicking a link (with #top) located […]

Categories
PHP / MySQL

Get Browser Information using PHP?

Source from : http://php.net/manual/en/function.get-browser.php

Categories
PHP / MySQL

8 functions should know for PHP newcomer ?

Function 1 : array_rand Get a random variable in an array. Function 2: strip_tags Get rid of HTML tags in paragraph. Mostly use in CMS Function 3: strftime This function change type of date, time as we want Function 4: basename Get only a file name. Function 5: list Re-assign variable in an array Function […]

Categories
PHP / MySQL

Force SSL using htaccess

Forcing visitors to use SSL can be accomplished through your .htaccess file using mod_rewrite module. we have to force browsers to use secure connection only for sensitive pages like checkout, login pages..etc. Most of the payment gateways require SSL connection to processed and sent transactions otherwise they just hold the transaction. Here’s a quick way […]

Categories
PHP / MySQL

Check for valid email address in PHP

Below is the simple PHP function to check for valid email address.

Categories
Css

Web Safe Fonts

Below is the list of safe fonts for websites Have I missed anything here on the list, let me know via comments I will add it to the list.