Current location: Hot Scripts Forums » Programming Languages » PHP » Trouble With DIR's and searching


Trouble With DIR's and searching

Reply
  #1 (permalink)  
Old 12-19-04, 07:43 PM
CrAzY_CuStoMs CrAzY_CuStoMs is offline
Newbie Coder
 
Join Date: Oct 2004
Location: Ontario, Canada
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Trouble With DIR's and searching

im havin some trouble with a search im making. Ive got all my music in one DIR and i want to search the DIR for anything that matches my search string with a match percent above 50. But right now im not getting any results returned to me. the code im using is as follows

PHP Code:

  <?php
  $search 
strtolower("$_POST[search]");
  
$list opendir('./My Music');
  
$i 0;
  
$results readdir($list);
  
$num count($list);
  while (
$i $num){
        
similar_text strtolower($results[$i]), $search , &$p);
        if (
$p "50%"){
              echo 
"$results[$i]<br />";
          }
          
$i++;
  }
  echo 
"Total Results: $i";
  
?>
If anyone can help me with this... id appreciate it greatly

~Lance
__________________
CuStoM PHP scripts for cheep =D Contact me anyways you need for all your php needs
AIM- Tallgeesegw3
ICQ- 206498877
MSN- silver_suicide_rider@hotmail.com
YIM- comming soon
IRC- server- irc.chat-solutions.org
channel- Crazy_customs
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An error in searching function obie Hot Scripts Forum Questions, Suggestions and Feedback 0 06-12-03 10:23 AM


All times are GMT -5. The time now is 05:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.