note 40920 deleted from function.explode by nlopess

From: Date: Tue, 23 Mar 2004 17:15:03 +0000
Subject: note 40920 deleted from function.explode by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-67062@lists.php.net to get a copy of this message
Note Submitter: arjini@mac.com ---- Since this doesn't work: $string = 'Something'; $chars = explode('',$string); If you just need to do some simple operations on every character of a string (one at a time) try this: $string = 'Something'; for($i=0;$i<strlen($string);++$i){ echo $string{$i}; //add your command here } I should have figured that out long ago, but I didn't, so I thought I'd share for those of us who have thick skulls with certain aspects of PHP.

« previous php.notes (#67062) next »