note 68225 added to function.strlen

From: Date: Tue, 18 Jul 2006 22:15:36 +0000
Subject: note 68225 added to function.strlen
Groups: php.notes 
Request: Send a blank email to php-notes+get-114902@lists.php.net to get a copy of this message
I make a function like strlen(): <?php function contaci($string, $inc) { $item = substr($string, $inc, 1); if($item != "") { $inc++; $volta = contaci($string, $inc); return $volta; } else { return $inc; } } function conta($string) { $volta = contaci($string, 0); return $volta; } $string = "abcdef"; $conta = conta($string); // ==> 6 $string = " ab cd "; $conta = conta($string); // ==> 7 ?> ---- Server IP: 66.163.161.117 Probable Submitter: 201.43.59.11 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.strlen.php Edit -- http://master.php.net/note/edit/68225 Del: integrated -- http://master.php.net/note/delete/68225/integrated Del: useless -- http://master.php.net/note/delete/68225/useless Del: bad code -- http://master.php.net/note/delete/68225/bad+code Del: spam -- http://master.php.net/note/delete/68225/spam Del: non-english -- http://master.php.net/note/delete/68225/non-english Del: in docs -- http://master.php.net/note/delete/68225/in+docs Del: other reasons-- http://master.php.net/note/delete/68225 Reject -- http://master.php.net/note/reject/68225 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114902) next »