RE: [PHP] split on whitespace, preserving whitespace...

2001-07-20 Thread Don Read
On 20-Jul-2001 Garth Dahlstrom wrote: Hi all, I'm trying to build a spell checker for a web form. What has got me stumped is being able to do a split so that whitespace and words are stored as seperate elements of the same array. ideally, I'd use some form of preg_split to put: This

Re: [PHP] split on whitespace, preserving whitespace...

2001-07-20 Thread Alexandr Grinko
http://www.zend.com/zend/spotlight/spellchecking.php - Original Message - From: Don Read [EMAIL PROTECTED] To: Garth Dahlstrom [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, July 20, 2001 11:41 PM Subject: RE: [PHP] split on whitespace, preserving whitespace... On 20-Jul-2001

Re: [PHP] split on whitespace, preserving whitespace...

2001-07-20 Thread Garth Dahlstrom
Yup, I hear that... I'm going to use something like the following to do my pspell application... pre ?PHP $text = This contans (brackets) {white} shaz-zam this_under space; .; $matches = preg_split(/([\.\;\:\!\{\}\(\)\s]+)/,$text,-1, PREG_SPLIT_DELIM_CAPTURE); echo pre[$text]br[.

[PHP] split on whitespace, preserving whitespace...

2001-07-19 Thread Garth Dahlstrom
Hi all, I'm trying to build a spell checker for a web form. What has got me stumped is being able to do a split so that whitespace and words are stored as seperate elements of the same array. ideally, I'd use some form of preg_split to put: This contanswhite space . into an array like:

[PHP] split() function

2001-07-04 Thread David A Dickson
I have a comma separated spreadsheet with one field that contains two dates. the dates are formatted as dd/mm/yy and separated by either '' or '//' ex:3/12/9228/1/93 or 3/12/92//28/1/93 Problem: I need to split the field at the '' or '//' separator but if I do split('[//]', $field); it splits

Re: [PHP] split() function

2001-07-04 Thread David A Dickson
); should work, or you might have to put but thats not \ so you shouldn't need to comment out the slash... - Original Message - From: David A Dickson [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 4:37 AM Subject: [PHP] split() function I have a comma

Re: [PHP] split() function

2001-07-04 Thread David A Dickson
Thanks that helped, this is what I used: if (ereg(, $field)) $line = explode(, $field); else $line = explode(//, $field); On Thu, 5 Jul 2001 05:29:11 ReDucTor wrote: ?php $line2 = explode(, $field); for($i = 0; $i sizeof($line2); $i++){ if($line2[$i] == ) $useand = 1; else

Re: [PHP] split() function

2001-07-04 Thread Steve Edberg
: Thursday, July 05, 2001 4:37 AM Subject: [PHP] split() function I have a comma separated spreadsheet with one field that contains two dates. the dates are formatted as dd/mm/yy and separated by either '' or '//' ex:3/12/9228/1/93 or 3/12/92//28/1/93 Problem: I need to split the field

RE: [PHP] split string

2001-05-11 Thread Taylor, Stewart
: 11 May 2001 16:24 To: [EMAIL PROTECTED] Subject: [PHP] split string I got series of string value like this 1,2,3. And the seires are dynamaic, which means it is not always 1,2,3 but could be more, but always in this format that is separated by , . How do I pick each of value in the series

Re: [PHP] split string

2001-05-11 Thread Jason Stechschulte
On Fri, May 11, 2001 at 10:24:02AM -0500, Jacky wrote: I got series of string value like this 1,2,3. And the seires are dynamic dynamaic, which means it is not always 1,2,3 but could be more, but always in this format that is separated by , . How do I pick each of value in the series and

Re: [PHP] split string

2001-05-10 Thread Jack Dempsey
http://www.php.net/manual/en/function.explode.php explode on the comma... you could use while loop and variable variables to take care of the naming... -jack Jacky wrote: I got series of string value like this 1,2,3. And the seires are dynamaic, which means it is not always 1,2,3 but

[PHP] split and array logic

2001-05-01 Thread Matthew Luchak
I can't quite get the logic to create my own associative arrays: if: $stuff[0]=165.33.114.63 anonymous Mozilla/4.0 $stuff[1]=213.35.354.93 anonymous Mozilla/4.0 how do I end up with: $stuff[0][user]=165.33.114.63 $stuff[0][browser]=Mozilla/4.0

Re: [PHP] split and array logic

2001-05-01 Thread Gyozo Papp
I can't quite get the logic to create my own associative arrays: if: $stuff[0]=165.33.114.63 anonymous Mozilla/4.0 $stuff[1]=213.35.354.93 anonymous Mozilla/4.0 how do I end up with: $stuff[0][user]=165.33.114.63 $stuff[0][browser]=Mozilla/4.0 $stuff[1][user]=213.35.354.93

[PHP] Split Weirdness.

2001-04-30 Thread Nick Davies
Why does this work : $categorySplit = split(,, $row['category']); while (list($key, $value) = each ( $categorySplit )) { $categoryArray[$value] = 1; } But this not : while (list($key, $value) = each ( split(,, $row['category']) )) { $categoryArray[$value] = 1; } I keep

[PHP] split string value

2001-03-29 Thread Jacky
Hi people If I have value like [EMAIL PROTECTED] stored in a variable. How do I break it up to be take only the foo.com bit to use that to redirect user back to that URL? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"

[PHP] split string value again

2001-03-29 Thread Jacky
Hi again have to try again after I have not recieved any advice, I have a vairable that stores email address value. I need to break it so that I will only get the dmain name bit to store in another variable so that I can redirect user to that domain, like if user email is [EMAIL PROTECTED]

Re: [PHP] split string value

2001-03-29 Thread Yasuo Ohgaki
Use split('@',$email_address) http://www.php.net/manual/en/function.split.php -- Yasuo Ohgaki ""Jacky"" [EMAIL PROTECTED] wrote in message 005a01c0b8a0$453ede00$[EMAIL PROTECTED]">news:005a01c0b8a0$453ede00$[EMAIL PROTECTED]... Hi people If I have value like [EMAIL PROTECTED] stored in a

RE: [PHP] split string value again

2001-03-29 Thread Martin Cabrera Diaubalick
Try to use explode and keep the second element of the array Just a quick thought .. - Original Message - From: Jacky [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 12:52 AM Subject: [PHP] split string value again Hi again have to try again after I have

Re: [PHP] split string value again

2001-03-29 Thread dempsejn
y" [EMAIL PROTECTED] Date: Thursday, March 29, 2001 5:52 pm Subject: [PHP] split string value again Hi again have to try again after I have not recieved any advice, I have a vairable that stores email address value. I need to break it so that I will only get the dmain name bit to store in an

RE: [PHP] split string value again

2001-03-29 Thread Stewart Taylor
$addr = "[EMAIL PROTECTED]"; $splitaddr = explode("@",$addr); resulting in $splitaddr[0] = "test"; $splitaddr[1] = "foo.com"; -Stewart -Original Message- From: Jacky [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 23:52 To: [EMAI

Re: [PHP] split string value again

2001-03-29 Thread elias
try this snippet: ? if (ereg("[^@]+\$", "[EMAIL PROTECTED]", $result)) { $domain = $result[0]; echo $domain; } ? ""Jacky"" [EMAIL PROTECTED] wrote in message 009301c0b8a2$e856f6c0$[EMAIL PROTECTED]">news:009301c0b8a2$e856f6c0$[EMAIL PROTECTED]... Hi again have to try again after I

Re: [PHP] split string value again

2001-03-29 Thread [EMAIL PROTECTED]
ky' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, March 29, 2001 3:51 AM Subject: RE: [PHP] split string value again $addr = "mailto:[EMAIL PROTECTED]; $splitaddr = explode("@",$addr); resulting in $splitaddr[0] = "test"; $splitaddr[1] = "foo.c

Re: [PHP] split string value again

2001-03-29 Thread Steve Werby
"Jacky" [EMAIL PROTECTED] wrote: I have a vairable that stores email address value. I need to break it so that I will only get the dmain name bit to store in another variable so that I can redirect user to that domain, like if user email is [EMAIL PROTECTED] then I would like to break that

<    1   2