Bug #15348 Updated: strtok multiple string handling

From: Date: Sun, 10 Feb 2002 05:09:22 +0000
Subject: Bug #15348 Updated: strtok multiple string handling
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37@lists.php.net to get a copy of this message
ID: 15348 Updated by: jimw@php.net Reported By: dave@compunexus.com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: mandrake 8.0 -PHP Version: 4.0CVS-2002-02-03 +PHP Version: 4.0CVS-2002-02-0 New Comment: Please do not submit the same bug more than once. Previous Comments: ------------------------------------------------------------------------ [2002-02-03 03:47:38] dave@compunexus.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/?id=15348&edit=1

« previous php.bugs (#37) next »