[thelist] Stripping characters from string

David Kutcher david_kutcher at hotmail.com
Sun Apr 28 09:48:01 CDT 2002


Okay... now I know what you're trying to do.

Try this.

Do 4 find char within a string statements.  Each one finds the location of a
specific character

$1 will find the first " ( strpos($1, "\""); )
$2 will find the second " ( strpos($2, "\"", $1+1); ) // you need to offset
it
$3 will find the first < ( strpos($3, "<"); )
$4 will find the second > ( strpos($4, ">");  )

then do $name = substr("$thestring", $1, $2);

and $email = substr("$thestring", $3, $4);

Not the prettiest, but it'll work.

David
www.confluentforms.com





More information about the thelist mailing list