Req #15347 [Opn->Bgs]: strtok multiple string handling
| From: | jani@php.net | Date: | Fri, 31 Dec 2010 23:35:28 +0000 |
| Subject: | Req #15347 [Opn->Bgs]: strtok multiple string handling | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157446@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=15347&edit=1
ID: 15347
Updated by: jani@php.net
Reported by: dave at compunexus dot com
Summary: strtok multiple string handling
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: mandrake 8.0
PHP Version: 4.0CVS-2002-02-03
Block user comment: N
Private report: N
New Comment:
Incomprehensible request.
Previous Comments:
------------------------------------------------------------------------
[2002-02-03 03:47:13] dave at compunexus dot com
just a quick example of one think I'd like to do, I
figured out why it was failing, it was just toking the
last string twice instead of each string once. I suspect
it would require an extra parameter, but I'd like the
feature anyways....
Thanks
$field_display_tok = strtok ( "$field_display", ',' );
$field_val_tok = strtok ( "$field_val", ',' );
// still need to set type properly
while ( $field_display_tok && $field_val_tok )
{
// printf ( "field_edval: $field_edval, fieldval_tok:
$fieldval_tok\n");
if ( $field_edval == $field_val_tok )
printf ( " <option value = \"" .
$field_display_tok . "\" selected>" . $field_display_tok .
"\n" );
else
printf ( " <option value = \"" .
$field_display_tok . "\">" . $field_display_tok . "\n" );
$field_display_tok = strtok(",");
$field_val_tok = strtok(",");
printf ( "field_edval: $field_edval, fieldval_tok:
$field_val_tok\n");
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=15347&edit=1