Re: [PHP] Parsing a string

2003-01-03 Thread Khalid El-Kary
check explode() ;) http://www.php.net/manual/en/function.explode.php Regrads, Khalid Al-kary Hi- I'd like to parse the string returned by popen("uptime", "r");. The string that is returned is: 9:47am up 37 days, 16:24, 1 user, load average: 0.09, 0.02, 0.00 What I'd like is 5 strings...the

Re: [PHP] Parsing a string

2003-01-03 Thread Michael J. Pawlowsky
Just use explode() and then dont use what you dont want. Mike *** REPLY SEPARATOR *** On 03/01/2003 at 9:49 AM Greg wrote: >Hi- >I'd like to parse the string returned by popen("uptime", "r");. The string >that is returned is: > >9:47am up 37 days, 16:24, 1 user, load average:

Re: [PHP] parsing a string

2001-10-31 Thread John A. Grant
"Dl Neil" <[EMAIL PROTECTED]> wrote in message 042101c157f6$4cd9fb90$c014100a@jrbrown">news:042101c157f6$4cd9fb90$c014100a@jrbrown... > Two inter-dependent problems: > 1 a means of identifying a cipher within the text > 2 a means of replacing the cipher with HTML code Succinctly stated. >

Re: [PHP] parsing a string

2001-10-31 Thread John A. Grant
"Mike Eheler" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Beyond that, why not keep it conforming to HTML, and use an tag, > for example: > > This is some text . > > That way if you need to view the page "as-is" in a browser or whatever, > it'd still look f

Re: [PHP] parsing a string

2001-10-18 Thread Mike Eheler
Beyond that, why not keep it conforming to HTML, and use an tag, for example: This is some text . That way if you need to view the page "as-is" in a browser or whatever, it'd still look fine.. go grab yourself some good free html parser code, and analyse the options. If processat="server" th

Re: [PHP] parsing a string

2001-10-18 Thread DL Neil
John, Two inter-dependent problems: 1 a means of identifying a cipher within the text 2 a means of replacing the cipher with HTML code 1 there are a limited number of graphics formats (.GIF, .JPG, .PNG, etc) and the number you are prepared to contemplate may be even shorter. Thus it would not b

Re: [PHP] parsing a string

2001-10-18 Thread Jason G.
Why don't you do something like this: Then search for a regx something like (I am not sure of the exact syntax). Then parse the found tag, generate your I'm reading some HTML text from a file and echoing it to >stdout. The HTML text contains but I would rather >have the server do the work o

RE: [PHP] Parsing a string

2001-02-23 Thread PHPBeginner.com
Oh, yeah... my favorite: explode()! $var = '1,2,3,4,5,6,7,8,9,10'; $var_array = explode(',',$var); /* will become: $var_array[0] = '1'; $var_array[1] = '2'; $var_array[2] = '3'; $var_array[3] = '4'; ... and so on */ as you notice the array starts from 0 Sincerely, Maxim

Re: [PHP] Parsing a string

2001-02-23 Thread Simon Garner
From: "Todd Cary" <[EMAIL PROTECTED]> > Thanks all!! > > split() works like a champ!! > > Todd > > -- > Todd Cary > Ariste Software > [EMAIL PROTECTED] > If you're just tokenising by a comma, don't use split(), use explode(). split() accepts a regular expression for the separator, whereas expl

Re: [PHP] Parsing a string

2001-02-23 Thread Todd Cary
Thanks all!! split() works like a champ!! Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PRO

Re: [PHP] Parsing a string

2001-02-23 Thread mjriding
Yes... you can use the explode function. Example: if $item where "Hello,There", $parts[0] would = "Hello" and $parts[1] would = "There". Thanks, Mike Ridinger On Fri, 23 Feb 2001, Todd Cary wrote: > I have a comma delimited string that I need to parse into an array. Is > there a PHP funct

Re: [PHP] Parsing a string

2001-02-23 Thread Christian Reiniger
On Friday 23 February 2001 15:46, Hardy Merrill wrote: > Look up the "split" and "explode" functions - they both do basically > the same thing. > > $token_list = split(",", $string_to_parse); .. and if that doesn't suffice I can send you a nice'n'powerful CSV parser class :) -- Christian Rein

Re: [PHP] Parsing a string

2001-02-23 Thread Martin A. Marques
Mensaje citado por: Todd Cary <[EMAIL PROTECTED]>: > I have a comma delimited string that I need to parse into an array. Is > there a PHP function that will do that ? Did you check the string functions? explode for example? Saludos... ;-) System Administration: It's a dirty job, but someone

RE: [PHP] Parsing a string

2001-02-23 Thread Jon Haworth
I believe http://www.php.net/manual/en/function.explode.php is what you're after. HTH Jon -Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED]] Sent: 23 February 2001 14:41 To: [EMAIL PROTECTED] Subject: [PHP] Parsing a string I have a comma delimited string that I need to par

Re: [PHP] Parsing a string

2001-02-23 Thread Hardy Merrill
Look up the "split" and "explode" functions - they both do basically the same thing. $token_list = split(",", $string_to_parse); HTH. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com Todd Cary [[EMAIL PROTECTED]] wrote: > I have a comma delimited string that I