Some text databse help please

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Sun Feb 02, 2003 11:29 pm

algoritm...

1) search word converting to lower case
2) SELECT from mysql by REGEXP '%searchword%'
3) print results

User avatar
Redcircle
Moderator
Moderator
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Sun Feb 02, 2003 11:48 pm

He's not using a database so select statements won't work.


How many items are going to be in your files. Because there is no indexing it may go very slow with increased traffic and a large catalog.

anyways.. if you are firmilar with java/c++ then you should be firmilar with arrays which work pretty much the same way in PHP. http://www.php.net/array for more info anyways .

Code: Select all

$file = file('filename.txt');


that reads the contents of the filename.txt file into the array named $file.

Each index of the array contains a line from the file.

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Mon Feb 03, 2003 12:45 am

soory =)

in your way

eregi ("$searchword", $file[$numrow]);

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests