I have this string that I'm Getting from a Mysql Result:
Result1:
1/test3&2/test4&
Then, I have some ID from another mysql Result like this:
Result2:
$id = $row['id'];
Then I'm using an Explode in order to separate Result1:. Like I'm Getting this:
$nota3 = explode("&", $nota);
1/test3&
2/test4&
Now, I'm doing I'm using a foreach and then using another explode to separate the string by "/" delimiter.
foreach ($nota3 as $key) {
$nota4 = explode("/", $key);
}
The Result of this its something like this (for the firsts foreach iteration):
array(2) {
[0]=>
string(1) "1"
[1]=>
string(5) "test3"
}
Ok, So I cannot Compare nota4[0] with $id from Result2:
Things that I've Tried:
Using if and verify every type, converts
nota4[0]a$idto stringTry to use in_Array
Try to use strcmp($var1, $var2)
I'm Missing something but I really dont know what.
Also, when I tried I cant put nota4[0] into a html String like
$nota5= nota4[0];
echo "<p id='mic' class='text-dark bg-warning'>".$nota5."</p>";
Maybe its something silly but I tried everything without success.