PHP uksort() Function
<?php
function my_sort($a, $b)
{
if ($a == $b) return 0;
return ($a > $b) ? -1 : 1;
}
$people = array("Swanson" => "Joe",
Type: Posts; User: abhilash yohannan
PHP uksort() Function
<?php
function my_sort($a, $b)
{
if ($a == $b) return 0;
return ($a > $b) ? -1 : 1;
}
$people = array("Swanson" => "Joe",
PHP shuffle() Function
<?php
$my_array = array("a" => "Dog", "b" => "Cat", "c" => "Horse");
shuffle($my_array);
print_r($my_array);
PHP key() Function
<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland");
echo "The key from the current position is: " . key($people);
?>
PHP array_walk_recursive() Function
<?php
function myfunction($value,$key)
{
echo "The key $key has the value $value<br />";
}
$a1=array("a"=>"Cat","b"=>"Dog");...
PHP array_uintersect() Function
<?php
function myfunction($v1,$v2)
{
if ($v1===$v2)
{
return 0;
}
if ($v1 > $v2) return 1;
PHP array_reverse() Function
<?php
$a=array("a"=>"Dog","b"=>"Cat","c"=>"Horse");
print_r(array_reverse($a));
?>
Array ( [c] => Horse [b] => Cat [a] => Dog )
PHP array_slice() Function
Example 1
<?php
$a=array(0=>"Dog",1=>"Cat",2=>"Horse",3=>"Bird");
print_r(array_slice($a,1,2));
?>
Example 2
<?php...
PHP array_pop() Function
<?php
$a=array("Dog","Cat","Horse");
array_pop($a);
print_r($a);
?>
The output of the code above will be:
PHP array_combine() Function
Example 1
<?php
$a1=array("a","b","c","d");
$a2=array("Cat","Dog","Horse","Cow");
print_r(array_combine($a1,$a2));
?>
PHP array_chunk() Function
<?php
$a=array("a"=>"Cat","b"=>"Dog","c"=>"Horse","d"=>"Cow");
print_r(array_chunk($a,2));
?>
Array (
[0] => Array ( [0] => Cat [1] => Dog )
[1] => Array ( [0]...
PHP array_change_key_case() Function
Example 1
<?php
$a=array("a"=>"Cat","b"=>"Dog","c"=>"Horse");
print_r(array_change_key_case($a,CASE_UPPER));
?>
Example 2
PHP array_diff_ukey() Function
<?php
function myfunction($v1,$v2)
{
if ($v1===$v2)
{
return 0;
}
if ($v1>$v2)
Add an element to position 2 in an array - splice()
<html>
<body>
<script type="text/javascript">
var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write("Removed: " +...
Add new elements to the beginning of an array - unshift()
<html>
<body>
<script type="text/javascript">
var fruits = ["Banana", "Orange", "Apple", "Mango"];...
Java script array basic code
<html>
<body>
<script type="text/javascript">
var parents = ["Jani", "Tove"];
var children = ["Cecilie", "Lone"];
var family = parents.concat(children);
:[email protected]
So here we go again! PHP, one of the strongest languages in the whole web design world! If you know how to use it you have the power. Here we have PHP codes and scripts...
Games :mad: war
http://kcymarthunkal.bizhat.com
:mad: