I want to search word within a string by equidistant letters pattern:
Example I want to search love within the x's at a skip of 3 letters or every 4th letter:
My logic is that first I need to explode the keyword:
Code:
str_split($keyword);
But I'm not sure afterward. But it's not splitting the into hebrew letters, rather a black diamond shape with a ?.
So far I have this:
PHP Code:
<?php
for($tdid=0; $tdid < count($id); $tdid++){
$strText=stripslashes(mysql_escape_string($textData[$tdid]));
include("../includefiles/vowelmarks.php");
for($i=0; $i<count($vm); $i++){
//echo $vm[$i];
$strText=str_replace($vm[$i], "", $strText);
}
$letters=str_split($strText);
for($i=0; $i<count($letters); $i++){
if($letters[$i]!==" "){
if($i==0 or ($i%2)==22){
?><tr><?php
}
//include("../includefiles/highlight_getBibleCode.php");
echo "<td id=\"regular[]\" style=\"font-size: 14px; direction: rtl; font-family:'SBL Hebrew';\">".$letters[$i]."</td>\n";
if(($i%2)==22){
?></tr><?php
}
}
}
}