Forum Moderators: coopster

Message Too Old, No Replies

Counting Letters

         

ukgimp

3:13 pm on Nov 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It feels like i am close. Howver the below funtion produces a value of 4, as it groups the letters. Is there a command to do that for the actual number of characters.

cheers

$phrase = "abcad";

$num_char = count(count_chars($phrase,1));
echo $num_char;

ukgimp

3:23 pm on Nov 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you mess around for ages, post a question then find the flaming answer

strlen($str);

bloke in a box

4:57 pm on Nov 24, 2004 (gmt 0)

10+ Year Member



Hehehe :) www.php.net is your best resource for basic php commands.

ukgimp

7:03 pm on Nov 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i like your nic lol, cheers

mincklerstraat

9:08 am on Nov 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I find it's worthwhile, every few weeks, just to look at the string functions and array functions to see if anything new strikes you, or if there's anything you could use to speed up your programming. And every few months, the other functions. This can really speed up your programming.

elgumbo

12:01 pm on Nov 25, 2004 (gmt 0)

10+ Year Member



you mess around for ages, post a question then find the flaming answer

I can't tell you how many times I have started to post a question only to figure out the solution straight away.

I think it is something to with the process of trying to formulate a question in plain English that seems to unlock something inside my head.

ukgimp

2:03 pm on Nov 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mincklerstraat

I think i do need to have a more frquent look throught the functions list.

I may just do that if i remember :)