Page 1 of 1

Get characters in between 2 strings

Posted: Tue Dec 16, 2008 1:18 am
by zerandib
Hello

how to get in between characters of a string!

$variable_A = "Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However should you forget your password you can request a new one which will be activated in the same way as this account."

i want to get the characters (string) between However and which

Need to get this "should you forget your password you can request a new one"

how to do such a thing?

Re: Get characters in between 2 strings

Posted: Tue Dec 16, 2008 1:27 am
by phpserver
You will need a full php script called forgot password.

Code: Select all

<?
class Forgot_password extends model
{
function lost_pass()
{
//ways to retrieve lost pass
}
}
?>

Re: Get characters in between 2 strings

Posted: Tue Dec 16, 2008 1:46 am
by ddragas
he was asking
Need to get this "should you forget your password you can request a new one"
NOT what he needs for script.

There are several ways in accomplishing what you want to do.

Try some of this or combination of functions

pregmatch

strpbrk

strpos
substr

Re: Get characters in between 2 strings

Posted: Tue Dec 16, 2008 1:57 am
by cavemaneca
ddragas wrote:he was asking
Need to get this "should you forget your password you can request a new one"
NOT what he needs for script.

There are several ways in accomplishing what you want to do.

Try some of this or combination of functions

pregmatch

strpbrk

strpos
substr


I think he won't stop posting new topics until someone writes his code for him