Results 1 to 11 of 11

Thread: how to search by skipping equidistant letters

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    447

    how to search by skipping equidistant letters

    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:
    xxxlxxxoxxxvxxxexxx
    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==or ($i&#37;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
                
    }
            }
        }
    }
    Last edited by gilgalbiblewhee; Jan 19th, 2011 at 12:38 AM.
    Compare bible texts (and other tools):
    TheWheelofGod

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width