Hi to all!
May be it's a very very stupid question, but I am stuck on it...
So my problem is the second - I have array
$pacient[$val['pacientid']][] = $val['f_name']." ".$val['s_name'];
And I want to compare values in this array, so how I go throught array:
$pacient = array_unique($pacient);
foreach($pacient as $key_pk=>$pac)
{
$pac = array_unique($pac);
var_dump($pac);
}
and I got this var_dump():
array(1) {
[0]=>
string(16) "anna lukaševica"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
array(2) {
[0]=>
string(16) "anna lukaševica"
[1]=>
string(17) "anna lukashevicha"
}
So I need to compare those strings between them, i.e if(string1 != string2) {//do something}
But I can't get array value for compare.. or I am missing somthing in my logic?
Please help me!