[PHP] parsing a string

2004-10-20 Thread Dan McCullough
Hey everyone Having a bit of trouble with something. I have a string which has known patterns. $string"CampusBob (Williams)~\toms more crap)~\blah blah blah)~\"; What I am looking for is Location which is Campus Locat

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:

[PHP] Parsing a string

2003-01-03 Thread Greg
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 first contains "37 days, 16:24", the second "1 user", the third "0.09", the fourth "0.02", and the

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
tely after the filename, you won't have problems with other quoted strings getting caught up/misinterpreted! It takes a warped mind... Warped enough for you? =dn - Original Message - From: "John A. Grant" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sen

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

[PHP] parsing a string

2001-10-18 Thread John A. Grant
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 of looking up the image size. I know how to lookup the image size with getimagesize(). My problem is in coming up with a good format for embedding a reference to

RE: [PHP] Parsing a string

2001-02-23 Thread PHPBeginner.com
as you notice the array starts from 0 Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 11:41 PM To: [EMAIL

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 ne

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

[PHP] Parsing a string

2001-02-23 Thread Todd Cary
I have a comma delimited string that I need to parse into an array. Is there a PHP function that will do that ? Many thanks.. Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For addition