Ooops, got lost in the thought....
$text_area = $_POST[ "textarea" ];
$str = strtok( $text_area, "\o" );
while( !( $str === FALSE )) {
$text_array[] = $str;
}
for( $i = 0; $i < count( $text_array ); $i++ ) {
for( $j = 0; $j < stlen( $text_array[ $i ]) {
$char = substr( $array_elelment[ $i ], $j );
printf( $char );
}
-----Original Message-----
From: Galbreath, Mark A
Sent: Monday, April 12, 2004 5:06 PM
To: 'Hull, Douglas D'; 'Note To php mysql List (E-mail)'
Subject: RE: [PHP-DB] getting one line of info at a time
Find out what the hex is for a carriage return and use strtok() to get an
array of words, then use strlen to get the number of chars in each array
element, and use array_pop() or array_shift(), iterating over the strlen, or
test for NULL for each element in the array..
Mark
-----Original Message-----
From: Hull, Douglas D [mailto:[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 4:45 PM
To: Note To php mysql List (E-mail)
Subject: [PHP-DB] getting one line of info at a time
1. I have a regular html textarea field for a person to enter in words with
a carriage return after each word. In PHP how would I go about getting one
line (or word) at a time? Then I will be needing to get character by
character.
2. I will then be searching my database to get matching values in order to
do other things.
But at the moment I am jus trying to figure #1 out.
Thanks for any help.
Doug
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php