Get Unique Values From Array Without Using Function

If two sets have some values present and some values are unique. Just like set A does not contain the value that set B has. It will be the unique value. Same as if we have two arrays in php language and we need to get the unique values from both what we will do for it ? Right we will use some function to get our job done. But here we are going to done this job without using any function or method.

Code:

<center>
<?php ini_set('display_errors', 0);
error_reporting(E_ERROR | E_WARNING | E_PARSE);  ?>

<?php 

$array_one = array (23,34,78,12,23,56);
$array_two = array (23,50,23,43,34,64);
 
echo "<pre>";
echo print_r($array_one);
echo "<br>";
echo print_r ($array_two);
echo "<br";
echo print_r($array_abd);
echo "<br>";echo "<br>";echo "<br>";echo "<br>";echo "<br>";
 foreach ($array_one as $key=>$value)
 {
 	$b = $b + 1;
 	}
			//		echo $b;
 	echo "<br>";
 echo "<h2>Same values are</h2><br />";
 for ($count=0 ; $count<=$b ; $count++)
 
 
 {
 	
 	
 	
 if (isset($array_one[$count]))
 	{
 	
  for ($i=0 ; $i<=$b ; $i++)
  	{
 	
  		if ($array_one[$count] == $array_two[$i])
  			{
 		
   break;	
   		}
   		
  	if ($array_one[$count] != $array_two[$i])
  			{
   
  			echo	$array_one[$count];
  			echo "<br />";
   break;
   	
   		} 		
 	
 	
  	}
 		
 		}
 	
 	}
?></center>

This is how we will get the unique values from two arrays. Now say thanks to those developers who make functions for us to solve these little things in seconds. Don’t forget to comment if you like this little tutorial.