Gaurav Jassal
<?php Ideas are my bread n butter. I mold and shape them into living breathing interactive experiences and captivate. I believe that great interactive ideas drive on the tension between design and code. ?>
Info
(contact)

+44.7518.599.587
hello[at]gauravjassal[dot]com

<Filter Array into Categorized format/>

This simple yet powerful class to filters an array and breaks in to a categorized array format.You can use this class if you are dealing with large and complex array and want to convert it into and simple array that is easy to understand and use. Recently i required a function that can categorize an array and break it into categorize format.I couldn't find any core function to do that so i decided to create my own class that can do this job for me. I have also added an example to demonstrate the usage to its benefit. Make sure you comment it if you find it useful.

Original Array

$arrProducts=array(
        array(
        "product_id" 			=> "007",
        "product_name"      	=> "Blackberry R-900 Mobile",
        "product_price" 		=> "£450",
        "product_status"		=>"1",
        "product_category"		=>"Mobile"
        ),
		array(
        "product_id" 			=> "033",
        "product_name"      	=> "8 GB Pendrive",
        "product_price" 		=> "£14.99",
        "product_status"		=> "0",
        "product_category"		=> "Computers"
        )
);
<read complete article/>
Page 1 of 1 pages

Wise Words

"If we know who we are, we will not try to become someone else in order to have value and meaning in our lives. If we don't know who we are, we will try to become someone who someone else wants us to be."

- Robert McGee

Social Things

Where you can fine me !!

View Gaurav Jassal's profile on LinkedIn

View Gaurav Jassal's profile on LinkedIn View Gaurav Jassal's profile on Delicious View Gaurav Jassal's profile on Digg View Gaurav Jassal's profile on Facebook View Gaurav Jassal's profile on feedburner View Gaurav Jassal's profile on flickr View Gaurav Jassal's profile on lastfm View Gaurav Jassal's profile on netvibes View Gaurav Jassal's profile on twitter RSS

Search Box


Advanced Search