Edit report at http://bugs.php.net/bug.php?id=15347&edit=1
ID: 15347 Updated by: [email protected] 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
