Dore van Hoorn wrote:
Well, i'm kind of a newby, but this is what i would like to do in php:

1. i'm writing all instances of a mysql table to a txt file, but when i add
"\n" to go on on the next line, in the txt file there is a square printed.
When i try to import the txt file into ms access, the square is not recognized
by this program to represent a newline.. how can i add a newline to a txt
file, that actually IS a newline (or better: hard return) and that will be
recognized as one, when reading the file into another program?
Newline in dos/windows text files is "\r\n"


2. a array contains a string of text, multiple words and interpunction. my first
question: how can i remove the interpunction ( i know how to strip slashes
and trim spaces..)?

strtr() -- cantains also an example


secondly, after this, i would like to count all double
entries. f.e. when the word computer occurs twice in the sentence, i would
like to make an array that is twodimensional: word-number of occurences (f.e.
'computer' '2'). How do i do that, for i don't really understand the phpmanual-explanation
about this topic. And thirdly: how do i get both facts (word and number)
out of the array? (all this has to produce a word-frequecylist, so if anybody
has a clue how to do that......)

First you need to get and array of all words - use explode() or preg_split(). Then you need to loop the array and count the words.



3. how can i upload an image to my server and then call the image back into
a webpage, just by using php?

http://www.php.net/manual/en/features.file-upload.php


+++++++++++++++++++++++++++++++++++
N    Dore van Hoorn
S    s1000454 AlfaInformatica-RuG
E    [EMAIL PROTECTED]
W    http://www.let.rug.nl/~s1000454
+++++++++++++++++++++++++++++++++++




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to