PDA

View Full Version : String functions - pleez help



Maarten Martens
June 12th, 2003, 07:44
hello,

I was wondering if there are non-select statement string functions available in PHP. I found this in the manual
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#String_functions

What I would like to do is the following. I load a text field from the db and place it in a var. Now I would like to search this var for a certain word, and like to have the position in the var. Finally, using this position, I would like to cur the text in the var and place it in a new one ... So in other words, grab a piece of the text in the var into a new var ...

Is this possible by use of standard functions?

Thank you in advance,
Maarten

Maarten Martens
June 12th, 2003, 09:38
Okay, this was a stupid question, so it seems ...

Anyway, I found a great list with extra info, if there are people out there with the same questions as me, check this link :
http://www.phpbuilder.com/manual/ref.strings.php

the solution for my problem seems to be the strstr function!

Cheers,
Maarten