02-07-2007
Pls is there any difference btw Linux and Unix? Or is Linux an example of a Unix OS?
Thanks.
10 More Discussions You Might Find Interesting
1. IP Networking
hello
i would like to get a server so i may post websites on the web
do i have to pay a lot of money to use someone else's server or is there a way to turn a computer into a basic server
please help
i am trying to find the most inexpensive way to get my own domain up on the web
if this is... (1 Reply)
Discussion started by: skistar
1 Replies
2. Programming
i am new to the programing enviroment
i know html and some of cgi
i would like to know how to creat programs
i know nothing!!!!!!!!!!!!!
what do i need to get started
where can i learn the language
what language do i need to learn
i tried scheme http://www.htdp.com
it did not work out well... (9 Replies)
Discussion started by: skistar
9 Replies
3. UNIX for Dummies Questions & Answers
hi i need some help on command grep and pipe
but the man grep and man pipe doesn't help me much
is there any site show more detail help on all the unix command?? (1 Reply)
Discussion started by: goodman
1 Replies
4. UNIX for Dummies Questions & Answers
I know I'm jsut a newbie, I'm setting up a 1.3 ghz dell as a server. I have experiance using Windows for a webserver, and I was jsut woundering if I would have great difficulty using Unix.
is there there like netscape for internet?
is there like word?
can you listen to Mp3s?
can someone... (4 Replies)
Discussion started by: Special K
4 Replies
5. UNIX Desktop Questions & Answers
Hi,
I am interested in learning unix and would like some advice on how I would start to learn unix.
Therefore,
What would be a good (free) unix distribution to install?
Would it be better to invest in a packaged Linux distribution (redhat etc) and get the feel for unix this way?
Are... (4 Replies)
Discussion started by: wolf2
4 Replies
6. UNIX for Dummies Questions & Answers
Hey all. I am a MS person that is looking to get into real computing for a change. I have seen a few different references to "UNIX Essentials and Core" DVD in different newbie threads and a quick intraweb search on Google only comes up with links to this forum and an Amazon review.
Does anyone... (3 Replies)
Discussion started by: cfjohnsn
3 Replies
7. UNIX for Dummies Questions & Answers
Hello everyone,
Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware.
I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies
8. Shell Programming and Scripting
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies
9. UNIX for Dummies Questions & Answers
please help me with my assignment. i have no background with unix programming. so please do help me.
here is the problem
Develop a utility that will enhance the current file management and
organization functions of Linux.
You may use existing file management commands to create... (1 Reply)
Discussion started by: jaesen_b23
1 Replies
10. Shell Programming and Scripting
Hi,
I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script.
I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies
LEARN ABOUT PHP
str_word_count
STR_WORD_COUNT(3) 1 STR_WORD_COUNT(3)
str_word_count - Return information about words used in a string
SYNOPSIS
mixed str_word_count (string $string, [int $format], [string $charlist])
DESCRIPTION
Counts the number of words inside $string. If the optional $format is not specified, then the return value will be an integer representing
the number of words found. In the event the $format is specified, the return value will be an array, content of which is dependent on the
$format. The possible value for the $format and the resultant outputs are listed below.
For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain,
but not start with "'" and "-" characters.
PARAMETERS
o $string
- The string
o $format
- Specify the return value of this function. The current supported values are:
o 0 - returns the number of words found
o 1 - returns an array containing all the words found inside the $string
o 2 - returns an associative array, where the key is the numeric position of the word inside the $string and the value is the
actual word itself
o $charlist
- A list of additional characters which will be considered as 'word'
RETURN VALUES
Returns an array or an integer, depending on the $format chosen.
CHANGELOG
+--------+--------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+--------------------------------+
| 5.1.0 | |
| | |
| | Added the $charlist parameter |
| | |
+--------+--------------------------------+
EXAMPLES
Example #1
A str_word_count(3) example
<?php
$str = "Hello fri3nd, you're
looking good today!";
print_r(str_word_count($str, 1));
print_r(str_word_count($str, 2));
print_r(str_word_count($str, 1, 'aaac3'));
echo str_word_count($str);
?>
The above example will output:
Array
(
[0] => Hello
[1] => fri
[2] => nd
[3] => you're
[4] => looking
[5] => good
[6] => today
)
Array
(
[0] => Hello
[6] => fri
[10] => nd
[14] => you're
[29] => looking
[46] => good
[51] => today
)
Array
(
[0] => Hello
[1] => fri3nd
[2] => you're
[3] => looking
[4] => good
[5] => today
)
7
SEE ALSO
explode(3), preg_split(3), split(3), count_chars(3), substr_count(3).
PHP Documentation Group STR_WORD_COUNT(3)