how to make an unique array from duplicate value containing array

<?php

$allphone = array(
 '11111',
 '22222',
 '33333',
 '44444',
 '55555',
 '55555',
 '66666',
 '+66666',
 '77777',
 '88888',
 '99999',
 '00000');

echo "Duplicate value Array: ";
echo "<br>";
print_r($allphone);
echo "<br>";

echo "Unique Value Array: ";
echo "<br>";
$uniqueArray = array_unique($allphone);
print_r($uniqueArray);

echo "<br>";

?>
OUTPUT:

Duplicate value Array: 
Array ( [0] => 11111 [1] => 22222 [2] => 33333 [3] => 44444 [4] => 55555 [5] => 55555 [6] => 66666 [7] => +66666 [8] => 77777 [9] => 88888 [10] => 99999 [11] => 00000 ) 

Unique Value Array: 
Array ( [0] => 11111 [1] => 22222 [2] => 33333 [3] => 44444 [4] => 55555 [6] => 66666 [7] => +66666 [8] => 77777 [9] => 88888 [10] => 99999 [11] => 00000 ) 

Here all duplicate values are removed.

how to search duplicate elements from array and creates unique array

<?php

$allphone = array(
 '11111',
 '22222',
 '33333',
 '44444',
 '55555',
 '55555',
 '66666',
 '+66666',
 '77777',
 '88888',
 '99999',
 '00000');

echo "Mixed Array: "."<br>";
print_r($allphone);
echo "<br>";

$narr = array();
 foreach ($allphone as $value) 
 {
 if( in_array($value, $narr) )
 { 
 }
 else
 {
     array_push($narr, $value);
 } 
}

echo "New Array"."<br>";
print_r($narr);
?>
OUTPUT:
Mixed Array:
Array ( [0] => 11111 [1] => 22222 [2] => 33333 [3] => 44444 [4] => 55555 [5] => 55555 [6] => 66666 [7] => +66666 [8] => 77777 [9] => 88888 [10] => 99999 [11] => 00000 ) 

New Array
Array ( [0] => 11111 [1] => 22222 [2] => 33333 [3] => 44444 [4] => 55555 [5] => 66666 [6] => 77777 [7] => 88888 [8] => 99999 [9] => 00000 )

New array has all unique elements. all duplicate value is removed.

how to search an element in an array using php

<?php
// SEARCHING ELEMENTS IN AN ARRAY

// FIND IN THIS ARRAY
$allphone = array(
 '9831458564',
 '9831256415',
 '9854657616',
 '9654857617',
 '9645877618',
 '8569877898',
 '5824578985',
 '12345678',
 '584587258',
 '5265487',
 '1234567890');

// HAVE TO FIND THESE VALUES
$findPhoneArray = array('1234567890', '5265487');

 foreach ($allphone as $value) 
 {
 echo $value;
 echo "<br>";
 $ss = array_search($value, $findPhoneArray);
 echo "found in =>";
 print_r($ss);
 echo "<br>";
 }
 
?>

what is test credentials in payubiz payment gateway integration in php

https://test.payu.in/_payment  

 You can check whether you are able to reach the payment page successfully and see the credit card options. 

Merchant ID: gtKFFx 
SALT: eCwWELxi

Following are the test card details to do test transactions. :
CardName – Any name
CardNumber: 5123456789012346
CVV: 123
Expiry: 05-17

Same works on debit card and netbanking options as well. This is advisable as once you do this it is good to go for netbanking also.