Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Specifying with Array () : - It takes a Certain number of comma – Seprated key => value pairs.  Syntax : array( [ key => ] value ……. )

Similar presentations


Presentation on theme: " Specifying with Array () : - It takes a Certain number of comma – Seprated key => value pairs.  Syntax : array( [ key => ] value ……. )"— Presentation transcript:

1  Specifying with Array () : - It takes a Certain number of comma – Seprated key => value pairs.  Syntax : array( [ key => ] value ……. )

2

3

4

5 $new2) { print “Keys [“.$new1.”]”. “ value ”.$new2. “ ”; } ?>

6 Example 1 : $ages = array(“Viral “ => 10, ”Meet” => 20, “Swat” =>30 );

7 Example 2 : $ages [ ‘viral’ ] = “20 “; $ages [ ‘vijay’ ] = “25 “; $ages [ ‘Meet’ ] = “30 “; ~> Id Keys can be used in a Script :

8 Example 3 :

9 Example 4 : 34, “Two”=>50, 70.62, “Hello”=>”viral”); Foreach( $ar as $new1 => $new2 ) { print $new1.”=>”. $new2.” ”; } ?>


Download ppt " Specifying with Array () : - It takes a Certain number of comma – Seprated key => value pairs.  Syntax : array( [ key => ] value ……. )"

Similar presentations


Ads by Google