Page 1 of 1

PHP question, how to do this?

Posted: Thu Jan 11, 2007 7:40 pm
by Davy
Hey!

I thought there are enough programmers/coders here, and maybe one of you can tell me how to do the following.

I'm creating some new stuff for my s9y, but I haven't learnt the PHP Manual by heart. :) I also can't find what I'm looking for on PHP.net. I want to search a variable (like $field1) for an expression (like "word"). After that the script should do something depending on the search results. The last isn't a problem, but how to search variables for text?

Anyone who can help?
Thanks!

Re: PHP question, how to do this?

Posted: Fri Jan 12, 2007 8:44 am
by garvinhicking
Hi!

Two functions will come in handy:

http://www.php.net/stristr
http://www.php.net/preg_match

HTH,
Garvin

Re: PHP question, how to do this?

Posted: Fri Jan 12, 2007 3:49 pm
by Davy
garvinhicking wrote:Hi!

Two functions will come in handy:

http://www.php.net/stristr
http://www.php.net/preg_match

HTH,
Garvin
Going to look for that, thanks!