PHP array()

now I want to share a little about the PHP programming language I am studying
immediately wrote to the scene PHP array ()


array() creates an array, with keys and values. If you skip the keys when you specify an array, an integer key is generated, starting at 0 and increases by 1 for each value.

 Syntax : array (key => value)

example:
<?php
$a=array("a"=>"Bat","b"=>"Wolf","c"=>"Rabbit");
print_r($a);
?>

output : array ( [0] => Bat [1] => Wolf [2]  => Rabbit )

The array_change_key_case() function returns an array with all array KEYS in lower case or upper case.

example:
<?php
$a=array("a"=>"Bat","b"=>"Wolf","c"=>"Rabbit");
print_r(array_change_key_case($a,CASE_UPPER));
?> 

output: Array ( [A] => Bat [B] => Wolf [C] => Rabbit )

To Be Continued ^_^

Posted in , . Bookmark the permalink. RSS feed for this post.

Leave a Reply

Pages

Sandiah Notes Template Sandroid11.blogspot.com.