Blog Archives

  • PHP Array Functions

    PHP Array Functions

    PHP array functions allow you to access and manipulate arrays. Lot of array functions are available in php and i added most of the array functions in this article


  • PHP Basic concepts

    PHP Basic concepts

    What is PHP? Syntax PHP File How PHP Works? Evolution Of PHP PHP Advantages PHP Comments What is PHP? PHP stands for “PHP: Hypertext Preprocessor”. Initially it was called “personal home page” PHP is […]


  • PHP First Program

    PHP First Program

    Syntax PHP echo Syntax See the below table to get the opening and closing tags of php Opening Tag Closing Tag <?php ?> <? ?> <script language=’php’> </script> PHP echo The echo statement insert […]


  • PHP Variables And Constant

    PHP Variables And Constant

    What is Variable? Rules For Variable Variable Types Constant Predefined Variables What is Variable? PHP6 introduce 64bit integer A variable is a representation of particular value. Simplay we can call this “containers” for storing […]


  • array_change_key_case

    array_change_key_case

    Syntax:array array_change_key_case ( array $input [, int $case = CASE_LOWER ] ) Description: Changes all keys in an array <?php $input_array = array("FirSt" => 1, "SecOnd" => 'Hai'); print_r( array_change_key_case ( $input_array, CASE_UPPER ) […]


  • array_chunk

    array_chunk

    Syntax:array array_chunk ( array $input , int $size [, bool $preserve_keys = false ] ) Description:Split an array into chunks <?php $input_array = array('a', 'b', 'c'); print_r( array_chunk ( $input_array, 2) ); print_r( array_chunk […]


  • array_combine

    array_combine

    Syntax:array array_combine ( array $keys , array $values ) Description:Creates an array by using one array for keys and another for its values <?php $a = array('green', 'red', 'yellow'); $b = array('avocado', 'apple', 'banana'); […]


  • array_count_values

    array_count_values

    Syntax:array array_count_values ( array $input ) Description:Counts all the values of an array <?php $array = array(1, "hello", 1, "world", "hello"); print_r(array_count_values($array)); ?> OUTPUT <?php Array ( [1] => 2 [hello] => 2 [world] […]


  • array_diff

    array_diff

    Syntax:array array_diff_assoc ( array $array1 , array $array2 [, array $… ] ) Description:Computes the difference of arrays with additional index check <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", […]


  • array_diff_key

    array_diff_key

    Syntax:array array_diff_key ( array $array1 , array $array2 [, array $… ] ) Description:Computes the difference of arrays using keys for comparison <?php $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, […]