[PHP] rather a mysql question

2002-05-03 Thread Ando Saabas
Sorry that this is more of a mysql question, but since most php programmers use it a lot, i though i might find the answer without subscribing to mysql list, here goes: When i do a query from a big table using indexes,it takes for example 5 seconds. Now if i, after some time repeat the query, the

[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando Saabas
I need to produce an array of all the links(hrefs) in a remote file (actually those that refer to files in the same remote server, but thats another matter). I'm pretty new to php, i was thinking of doing it with ereg, something like eregi("a href[\"]?=(.*)>", $file, $link); but i cannot think of

[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando Saabas
I need to produce an array of all the links(hrefs) in a remote file (actually those that refer to files in the same remote server, but thats another matter). I'm pretty new to php, i was thinking of doing it with ereg, somethin like eregi("a href[\"]?=(.*)>", $file, $link); but i cannot think of

[PHP] PHP output during longer program run times

2002-03-06 Thread Ando Saabas
Lets say i have a script that runs for a longer period of time, 1-10 minutes. Id like the script to give output as to what it is doing while it runs, but the problem is, that it wont print output on runtime, but it will output everything at the same time after it has completed the whole job. Even

[PHP] regular expression for (NOT 'word')

2002-03-14 Thread Ando Saabas
how would i build a regular expression in php that would match everything but the given word. For example, match the string only if there isnt a word 'php' in the string. I understand i can list characters i dont want to see in the string: [^php]. but this means there cant be any p or h in the str

Re: [PHP] regular expression for (NOT 'word')

2002-03-14 Thread Ando Saabas
rote: > the best you can do is: > > $a = "this has php in the string"; > if( ! ereg("php", $a ) ) > { print "a: not in string"; } > $a = "this has in the string"; > if( ! ereg("php", $a ) ) > { print "b: not in string&qu