note 101740 added to function.strlen

From: Date: Sat, 08 Jan 2011 09:52:04 +0000
Subject: note 101740 added to function.strlen
Groups: php.notes 
Request: Send a blank email to php-notes+get-175528@lists.php.net to get a copy of this message
Hello all, May I pos my firs function as novice in php here . This funtion count all characters in a strign without spaces , so only chars, no spaces . function countchar ($string) { $result = strlen ($string) - substr_count($string, ' '); echo $result; } countchar ($a); Hope to be useful for somebody ! ---- Server IP: 69.147.83.197 Probable Submitter: 89.28.69.49 ---- Manual Page -- http://www.php.net/manual/en/function.strlen.php Edit -- https://master.php.net/note/edit/101740 Del: integrated -- https://master.php.net/note/delete/101740/integrated Del: useless -- https://master.php.net/note/delete/101740/useless Del: bad code -- https://master.php.net/note/delete/101740/bad+code Del: spam -- https://master.php.net/note/delete/101740/spam Del: non-english -- https://master.php.net/note/delete/101740/non-english Del: in docs -- https://master.php.net/note/delete/101740/in+docs Del: other reasons-- https://master.php.net/note/delete/101740 Reject -- https://master.php.net/note/reject/101740 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175528) next »