Right now I am working on a search function for my json decoded results
The code that I got looks like this:
<?php
foreach($soeg_decoded as $key => $val){
$value = $val["Value"];
$seotitle = $val["SEOTitle"];
$text = $val["Text"];
echo '<tr><td>' . $value . '</td><td>' . $seotitle . '</td><td>' . $text . '</td></tr>';
}
?>
I want it to only show the results, which contains a specific word, which are stored in a variable named $searchText.
Is there any functions or commands, which can seperate all the results, and only show the results which contains the word stored in $searchText.
Something like this:
if($value OR $seotitle OR $text contains $searchText){
echo '<tr><td>' . $value . '</td><td>' . $seotitle . '</td><td>' . $text . '</td></tr>';
}
Thanks in advance.