[snip]
Can anyone help with this ? its checking the $_POST and seeing if any of
the
items begin with answer_,
if the do it should remove it from the beginning and place it into
$value_new.. does not seem to work though...
foreach($_POST as $qid => $value) {
$findme = 'answer_';
if(stripos($value, $findme)) {
$value_new = ltrim($value);
print "$value_new<br>";
}
}
[/snip]
stripos should be strops and would look for a numeric value, not what
you want. You want strstr I believe
foreach($_POST as $qid => $value) {
$findme = 'answer_';
if(strstr($value, $findme)) {
$value_new = ltrim($value);
print "$value_new<br>";
}
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php