This topic is locked
[SOLVED]

 character count of one filed and display the amount in another field

4/7/2012 6:19:23 AM
PHPRunner General questions
S
scoobysteve author

Is it possible to display the amount of characters of a certain field in another field in the list page.
I want to have a score system based on content, and the more content the higher the score, so in a text box the more words entered the higher the count therefore score.

This is in PHPRunner 6.0

Thanks in advance

Steve

C
cgphp 4/7/2012

Create an alias field, set it as Custom and enter the following code:

$value = count(explode(" ",$data['certain_field']));


This is a very primitive approach. Probably, you would study a more complex solution to count the words.

S
scoobysteve author 4/7/2012



Create an alias field, set it as Custom and enter the following code:

$value = count(explode(" ",$data['certain_field']));


This is a very primitive approach. Probably, you would study a more complex solution to count the words.


Thanks you, this seems to count the words, which is even better thank you so much.
Steve