Rainrays Profiles
 
English
   Pregnancy & Care | Submit Your Free Ads | Tours & Travel India

Home rainrays profile world Contact Us Online Free Marketing Aadhaar Card Online Free Marketing Pregnancy & Care Online Free Marketing Tour n Travel Free Ads with rainrays Festivals  Tourist Attraction India Pincode India  Tourist Attraction India Tourist Attraction India Jobs Recipes Jobs Select Babies Name

 
Custom Search
More Topics...
  Pregnancy tips and care  Pregnancy tips and care
 YouTube Videos YouTube Videos
  Hospitals & clinics in India Hospitals & clinics in India
  Hospitals & clinics in India World Travel Tips
 Kitchen Dictionary Kitchen Dictionary
 Recipes Recipes
 Personality Personality
 Institute/Colleges Institute/Colleges
 Indian Festivals Indian Festivals
 University University
 Restaurant Restaurant
 Districts List in India Districts List in India
 Districts Profile of India Districts Profile of India
 Hotels Hotels
 BSNL STD Codes (INDIA) BSNL STD Codes (INDIA)
 Love dating and Romance Love dating and Romance
 Baby name list Baby name list
 Jobs by location Jobs by location
 Jobs by Keyword Jobs by Keyword
 Jobs by Function Jobs by Function
 Jobs Part Time Jobs Part Time
 Shayari Shayari

Best Indian Tours
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 Religious Tours International Tours
 Religious Tours Indian Tours for Overseas
 

array_merge(), array_pop(), array_push(), array_rand()

  Topic » Language » PHP » Array
Post By : Rainrays At 0000-00-00 00:00:00
array_merge() :  merges one ore more arrays
array_merge($arr1,$arr2,$arr3...)
 
Example
$arr1=array("w"=>"aaa","x"=>"bbb");
$arr2=array("y"=>"ddd","z"=>"ccc");
print_r(array_merge($arr1,$arr2));
?>
 
o/p: Array ( [w] => aaa [x] => bbb [y] => ddd [z] => ccc )
 
array_pop() : Remove last element of array
 
Example
 
$arr=array("AAA","BBB","CCC");
array_pop($arr);
print_r($arr);
?>
o/p: Array ( [0] => AAA [1] => BBB )
 
array_push($arr,$val1,$val2...): insert one or more element ti the end of array
 
$arr required, $val1 required , other values are optional
 
Example
$a=array("a"=>"Ram","b"=>"Kishor");
array_push($a,"Madhav","Dinesh");
print_r($a);
?>
 
o/p: Array ( [a] => Ram [b] => Kishor [0] => Madhav [1] => Dinesh )
 
 
array_rand() Find a key random from an array.
array_rand($arr,$num)
 
$arr is Required. he is an array 
$num is Optional. define how many key values required.
 
$arr=array("a"=>"dinesh","b"=>"Somu","c"=>"manager birjesh");
print_r(array_rand($arr,1));
?>
 
o/p: a 
 
$arr=array("a"=>"dinesh","b"=>"Somu","c"=>"manager birjesh","d"=>"ravi");
print_r(array_rand($arr,2));
?>
 
Array ( [0] => c [1] => b )

 




Difference bewteen array_key_exists() and array_keys()

 Bool array_key_exists([$key],[$arr])

  $key is required. For check key is exist in array key list $arr is required. Array have a key list   Example    "Somesh","b"=>"Birjesh"); if (array_key_exists(..

More...





Refer to Friend

  Rainryas information World
 

Share Info/View About Profile Or Any Comment

 
Your Name:*  
 
Comment:*  
 
 
 
Other Topic
इन लक्षणों से माता जान सकती है, गर्भ में लड़का या लड़की - ६ लक्षण
Thanjavur :: Vandayar Engineering College
Namkeen Lassi Recipe
Maharashtra :: Diveagar :: Hotels List
ILS 4 IAS
 
Create Your Profile in Category » Array
 
 
 
 
 
Related Content..
 47  Difference bewteen array_key_exists() and array_keys()
 46  Function array_flip()
 52  array_reverse(), array_search(),array_slice()
 44  array_count_values():Number of occurrences for each value in array
 53  array_unique(), array_unshift(), array_values(), array_walk()
 42  array()
 45  Functiion array_fill()
 43  array_chunk():Array splits into chunks of arrays
 
Special Tours Type India
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 International Tours International Tours
 Tours for Overseas Indian Tours for Overseas
More on rainrays.com
Top Links : Contact us | About us | Privacy & Policy | Terms & Condition | Extract Email | Submit URL to Search Engine
Jobs : Jobs by Location | Part Time Jobs | Jobs by Function | Jobs by Keyword | Jobs Out of india | Jobs Search Engine
Other Links
    Girl baby Names | Boy baby Names | Love dating and Romance | University | Restaurants in India | Hotels in India | Hospitals & clinic | Pregnancy & Care
    Coaching Institute | Educational Institution | School/Colleges by Loaction | Recipes | Std Code | PHP | Products | Links | PHP Interview Question

Copyright © 2010 --- All Rights Reserved