Re: [PHP] parsing select multiple="multiple"

2013-02-21 Thread tamouse mailing lists
On Thu, Feb 21, 2013 at 8:46 AM, Jim Giner wrote: > >> >> I *have* heard claims that something like this is preferrable, though: >> >> if (FALSE === $variable) >> > I believe I read a comment somewhere once that writing your IF statements > that way helped to trigger an error message when the code

Re: [PHP] parsing select multiple="multiple"

2013-02-21 Thread Jim Giner
I *have* heard claims that something like this is preferrable, though: if (FALSE === $variable) I believe I read a comment somewhere once that writing your IF statements that way helped to trigger an error message when the coder forgot to use the double equal sign (==) in the statement. I

Re: [PHP] parsing select multiple="multiple"

2013-02-20 Thread tamouse mailing lists
On Tue, Feb 19, 2013 at 1:02 PM, John Taylor-Johnston wrote: > > tamouse mailing lists wrote: >>> >>> >I hate arrays. :D >> >> Here's a small snippet showing how it works, I hope: >> >> foreach ($DPRpriority as $item => $value) { >>echo " ".$item.": ".$value['name']." selected: >> ".$value['se

Re: [PHP] parsing select multiple="multiple"

2013-02-20 Thread Jim Giner
On 2/20/2013 11:41 AM, Tedd Sperling wrote: On Feb 18, 2013, at 7:54 PM, John Taylor-Johnston wrote: I am capable with . (I suppose I did it correctly? :p ) But I haven't the first clue how to parse a and multiply select name="DPRtype". Would anyone give me a couple of clues please? :) Tha

Re: [PHP] parsing select multiple="multiple"

2013-02-20 Thread Tedd Sperling
On Feb 18, 2013, at 7:54 PM, John Taylor-Johnston wrote: > I am capable with . (I suppose I did it correctly? > :p ) > But I haven't the first clue how to parse a and multiply > select name="DPRtype". > Would anyone give me a couple of clues please? :) > Thanks, > John John: A clue? How abo

Re: [PHP] parsing select multiple="multiple"

2013-02-19 Thread Jim Giner
On 2/19/2013 2:02 PM, John Taylor-Johnston wrote: tamouse mailing lists wrote: >I hate arrays. :D Here's a small snippet showing how it works, I hope: foreach ($DPRpriority as $item => $value) { echo " ".$item.": ".$value['name']." selected: ".$value['selected']." \n"; } Question 1: when

Re: [PHP] parsing select multiple="multiple"

2013-02-19 Thread John Taylor-Johnston
tamouse mailing lists wrote: >I hate arrays. :D Here's a small snippet showing how it works, I hope: foreach ($DPRpriority as $item => $value) { echo " ".$item.": ".$value['name']." selected: ".$value['selected']." \n"; } Question 1: when did we have to add [] to a name to turn it into a

Re: [PHP] parsing select multiple="multiple"

2013-02-18 Thread tamouse mailing lists
On Mon, Feb 18, 2013 at 7:28 PM, John Taylor-Johnston wrote: > >>> >>> 1. Crimes Against >>> Persons >>> 2. Disturbances >>> 3. Assistance / >>> Medical >>> 4. Crimes Against >>> Property >>> 5. Accidents >>> / >>> Traffic

Re: [PHP] parsing select multiple="multiple"

2013-02-18 Thread David Robley
tamouse mailing lists wrote: > On Mon, Feb 18, 2013 at 6:54 PM, John Taylor-Johnston > wrote: >> I am capable with . (I suppose I did it >> correctly? :p ) >> But I haven't the first clue how to parse a and >> multiply select name="DPRtype". >> Would anyone give me a couple of clues please? :) >

Re: [PHP] parsing select multiple="multiple"

2013-02-18 Thread John Taylor-Johnston
1. Crimes Against Persons 2. Disturbances 3. Assistance / Medical 4. Crimes Against Property 5. Accidents / Traffic Problems 6. Suspicious Circumstances 7. Morality / Drugs 8. Miscel

Re: [PHP] parsing select multiple="multiple"

2013-02-18 Thread tamouse mailing lists
On Mon, Feb 18, 2013 at 6:54 PM, John Taylor-Johnston wrote: > I am capable with . (I suppose I did it > correctly? :p ) > But I haven't the first clue how to parse a and multiply > select name="DPRtype". > Would anyone give me a couple of clues please? :) > Thanks, > John > >Priority

Re: [PHP] Parsing the From field

2011-11-20 Thread Geoff Shang
On Sat, 19 Nov 2011, Ron Piggott wrote: Also the formatting of the from field changes in various e-mail programs: From: Ron Piggott From: "Ron Piggott" From: ron.pigg...@actsministries.org From: I've also seen: Piggott, Ron And that's before you get to people who only use their first na

Re: [PHP] Parsing the From field

2011-11-19 Thread Al
On 11/19/2011 11:29 AM, Alain Williams wrote: On Sat, Nov 19, 2011 at 11:23:59AM -0500, Ron Piggott wrote: I am unsure of how to parse first name, last name and e-mail address from the 'From:' field of an e-mail. What I am struggling with is if the name has more than two words - Such as the

Re: [PHP] Parsing the From field

2011-11-19 Thread Ron Piggott
AM To: Ron Piggott Cc: php-general@lists.php.net Subject: Re: [PHP] Parsing the From field On Sat, Nov 19, 2011 at 11:23:59AM -0500, Ron Piggott wrote: I am unsure of how to parse first name, last name and e-mail address from the 'From:' field of an e-mail. What I am struggling with is

Re: [PHP] Parsing the From field

2011-11-19 Thread Alain Williams
On Sat, Nov 19, 2011 at 11:23:59AM -0500, Ron Piggott wrote: > > I am unsure of how to parse first name, last name and e-mail address from the > 'From:' field of an e-mail. > > What I am struggling with is if the name has more than two words > - Such as the last name being multiple words > - A

Re: [PHP] Parsing a simple sql string in php

2011-05-06 Thread Ashley Sheridan
"Ken Guest" wrote: >On Fri, May 6, 2011 at 10:05 AM, Ashley Sheridan > wrote: >> Hiya, has anyone had any experience with parsing a string of sql to >break it down into its component parts? At the moment I'm using several >regex's to parse a string, which works, but I'm sure there's a more >elega

Re: [PHP] Parsing a simple sql string in php

2011-05-06 Thread Ken Guest
On Fri, May 6, 2011 at 10:05 AM, Ashley Sheridan wrote: > Hiya, has anyone had any experience with parsing a string of sql to break it > down into its component parts? At the moment I'm using several regex's to > parse a string, which works, but I'm sure there's a more elegant solution. > > The

Re: [PHP] Parsing a simple sql string in php

2011-05-06 Thread Stuart Dallas
On Friday, 6 May 2011 at 10:05, Ashley Sheridan wrote: Hiya, has anyone had any experience with parsing a string of sql to break it down into its component parts? At the moment I'm using several regex's to parse a string, which works, but I'm sure there's a more elegant solution. > > The general

Re: [PHP] Parsing JSON; back-slash problem

2009-12-15 Thread Andrew Burgess
Thanks guys; I've got it working now! On Tue, Dec 15, 2009 at 9:54 AM, Wouter van Vliet / Interpotential wrote: >> >> If you don't have access to do this, look at stripslashes() > > And if you absolutely want to be on the safe side - check* if the > magic_quotes option is enabled - if so; do stri

Re: [PHP] Parsing JSON; back-slash problem

2009-12-15 Thread Wouter van Vliet / Interpotential
> > > If you don't have access to do this, look at stripslashes() > And if you absolutely want to be on the safe side - check* if the magic_quotes option is enabled - if so; do stripslashes. If not - then obviously don't. * http://www.php.net/manual/en/function.get-magic-quotes-gpc.php > > > --

Re: [PHP] Parsing JSON; back-slash problem

2009-12-15 Thread Shawn McKenzie
Ashley Sheridan wrote: > On Tue, 2009-12-15 at 06:52 -0500, Andrew Burgess wrote: > >> This seems like a pretty basic question, but it has me stumped. >> >> Here's my scenario: I'm using Douglas Crockford's JSON2.js to parse an >> object in JavaScript, which I then pass to a PHP script to store in

Re: [PHP] Parsing JSON; back-slash problem

2009-12-15 Thread Ashley Sheridan
On Tue, 2009-12-15 at 06:52 -0500, Andrew Burgess wrote: > This seems like a pretty basic question, but it has me stumped. > > Here's my scenario: I'm using Douglas Crockford's JSON2.js to parse an > object in JavaScript, which I then pass to a PHP script to store in a > file. I use JSON.stringif

Re: [PHP] Parsing HTML href-Attribute

2009-01-18 Thread Micah Gersten
Depending on the goal, using the base tag in the head section might help: http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Edmund Hertle wrote: > Hey, > I want to "parse" a href-attribute in a given Stri

Re: [PHP] Parsing HTML href-Attribute

2009-01-18 Thread Benjamin Hawkes-Lewis
On 16/1/09 23:41, Shawn McKenzie wrote: Again, I say that it won't work on URLs with spaces, like "my web page.html". When I get a minute I'll fix it. I thought spaces in URLs weren't valid markup, but it seems to validate. Some small points of information: An HTML4 validator will only check

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Eric Butera
On Fri, Jan 16, 2009 at 6:18 PM, Kevin Waterson wrote: > This one time, at band camp, Eric Butera wrote: > >> >> You could also use DOM for this. >> >> http://us2.php.net/manual/en/domdocument.getelementsbytagname.php > > http://www.phpro.org/examples/Get-Links-With-DOM.html > > > Kevin > > -- >

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Shawn McKenzie
Edmund Hertle wrote: >> * http://www.google.com/search?q=php ... absolute path (yes, it's a URL, >> but treat it as absolute) >> * https://www.example.com/index.php ... absolute path (yes, it's a URL, >> but to the local server) >> * /index.php ... absolute path (no protocol given, true absolute pa

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Kevin Waterson
This one time, at band camp, Eric Butera wrote: > > You could also use DOM for this. > > http://us2.php.net/manual/en/domdocument.getelementsbytagname.php http://www.phpro.org/examples/Get-Links-With-DOM.html Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Kevin Waterson
This one time, at band camp, mike wrote: > On Fri, Jan 16, 2009 at 10:58 AM, mike wrote: > > > only if it's parseable xml :) > > > > Or not! Ignore me. Supposedly this can handle HTML too. I'll have to > try it next time. Normally I wind up having to use tidy to scrub a > document and try to g

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Edmund Hertle
> > * http://www.google.com/search?q=php ... absolute path (yes, it's a URL, > but treat it as absolute) > * https://www.example.com/index.php ... absolute path (yes, it's a URL, > but to the local server) > * /index.php ... absolute path (no protocol given, true absolute path) > * index.php ... re

RE: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Boyd, Todd M.
> -Original Message- > From: Shawn McKenzie [mailto:nos...@mckenzies.net] > Sent: Friday, January 16, 2009 2:37 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Parsing HTML href-Attribute > > >>>>> Hey, I want to "parse" a href-a

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Shawn McKenzie
>> I believe the OP wanted to leave already-absolute paths alone >> (i.e., only convert relative paths). The regex does not take into >> account fully-qualified URLs (i.e., >> http://www.google.com/search?q=php) and it does not determine if a >> given path is relative or absolute. He was wanting to

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Shawn McKenzie
Boyd, Todd M. wrote: >> -Original Message- From: Shawn McKenzie >> [mailto:nos...@mckenzies.net] Sent: Friday, January 16, 2009 1:08 >> PM To: php-general@lists.php.net Subject: Re: [PHP] Parsing HTML >> href-Attribute >> >> Shawn McK

RE: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Boyd, Todd M.
> -Original Message- > From: Shawn McKenzie [mailto:nos...@mckenzies.net] > Sent: Friday, January 16, 2009 1:08 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Parsing HTML href-Attribute > > Shawn McKenzie wrote: > > Boyd, Todd M. wrote:

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Shawn McKenzie
Shawn McKenzie wrote: > Boyd, Todd M. wrote: >>> -Original Message- >>> From: farn...@googlemail.com [mailto:farn...@googlemail.com] On Behalf >>> Of Edmund Hertle >>> Sent: Thursday, January 15, 2009 4:13 PM >>> To: PHP - General >>> Subject: [PHP] Parsing HTML href-Attribute >>> >>> Hey,

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Eric Butera
On Fri, Jan 16, 2009 at 1:59 PM, mike wrote: > On Fri, Jan 16, 2009 at 10:58 AM, mike wrote: > >> only if it's parseable xml :) >> > > Or not! Ignore me. Supposedly this can handle HTML too. I'll have to > try it next time. Normally I wind up having to use tidy to scrub a > document and try to ge

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread mike
On Fri, Jan 16, 2009 at 10:58 AM, mike wrote: > only if it's parseable xml :) > Or not! Ignore me. Supposedly this can handle HTML too. I'll have to try it next time. Normally I wind up having to use tidy to scrub a document and try to get it into xhtml and then use simplexml. I wonder how well

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread mike
On Fri, Jan 16, 2009 at 10:54 AM, Eric Butera wrote: > You could also use DOM for this. > > http://us2.php.net/manual/en/domdocument.getelementsbytagname.php only if it's parseable xml :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Eric Butera
On Thu, Jan 15, 2009 at 5:13 PM, Edmund Hertle wrote: > Hey, > I want to "parse" a href-attribute in a given String to check if there is a > relative link and then adding an absolute path. > Example: > $string = ' href="/foo/bar.php" >'; > > I tried using regular expressions but my knowledge of R

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Shawn McKenzie
Boyd, Todd M. wrote: >> -Original Message- >> From: farn...@googlemail.com [mailto:farn...@googlemail.com] On Behalf >> Of Edmund Hertle >> Sent: Thursday, January 15, 2009 4:13 PM >> To: PHP - General >> Subject: [PHP] Parsing HTML href-Attribute >> >> Hey, >> I want to "parse" a href-attr

RE: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Boyd, Todd M.
> -Original Message- > From: farn...@googlemail.com [mailto:farn...@googlemail.com] On Behalf > Of Edmund Hertle > Sent: Thursday, January 15, 2009 4:13 PM > To: PHP - General > Subject: [PHP] Parsing HTML href-Attribute > > Hey, > I want to "parse" a href-attribute in a given String to ch

Re: [PHP] Parsing HTML href-Attribute

2009-01-15 Thread Murray
Hi Edmund, You want a regex that looks something like this: $result = preg_replace('%(href=)("|\')(?!c:/)(.+?)("|\')%', '\1\2c:/my_absolute_path\3\4', $subject); This example assumes that your absolute path begins with "c:/". You would change this to whatever suits. You would also change "c:/my_

Re: [PHP] Parsing Strings

2008-12-07 Thread German Geek
Why not preg_split ( http://nz.php.net/manual/en/function.preg-split.php ): $str = 'SCOTTSDALE, AZ 85254'; $ar = preg_split('/,? ?/', $str); //optional comma, followed by optional space // $ar = array('SCOTTSDALE', 'AZ', '85254'); On Sat, Dec 6, 2008 at 1:18 PM, Jason Todd Slack-Moehrle < [EMAIL

Re: [PHP] Parsing Strings

2008-12-06 Thread Nathan Rixham
tedd wrote: At 4:18 PM -0800 12/5/08, Jason Todd Slack-Moehrle wrote: How might I also parse and address like: SCOTTSDALE, AZ 85254 It has a comma and a space -Jason On Dec 5, 2008, at 4:02 PM, Jason Todd Slack-Moehrle wrote: OK, making good learning progress today. I have a string that is

Re: [PHP] Parsing Strings

2008-12-06 Thread VamVan
u can use split() or explode (). Thanks On Sat, Dec 6, 2008 at 9:27 AM, tedd <[EMAIL PROTECTED]> wrote: > At 4:18 PM -0800 12/5/08, Jason Todd Slack-Moehrle wrote: > >> How might I also parse and address like: SCOTTSDALE, AZ 85254 >> >> It has a comma and a space >> >> -Jason >> >> On Dec 5, 200

Re: [PHP] Parsing Strings

2008-12-06 Thread tedd
At 4:18 PM -0800 12/5/08, Jason Todd Slack-Moehrle wrote: How might I also parse and address like: SCOTTSDALE, AZ 85254 It has a comma and a space -Jason On Dec 5, 2008, at 4:02 PM, Jason Todd Slack-Moehrle wrote: OK, making good learning progress today. I have a string that is: Jason Slack

Re: [PHP] Parsing Strings

2008-12-05 Thread Jason Todd Slack-Moehrle
How might I also parse and address like: SCOTTSDALE, AZ 85254 It has a comma and a space -Jason On Dec 5, 2008, at 4:02 PM, Jason Todd Slack-Moehrle wrote: OK, making good learning progress today. I have a string that is: Jason Slack and I want it broken at the space so i get Jason and the

Re: [PHP] Parsing XML

2008-12-01 Thread Nathan Rixham
Per Jessen wrote: Ashley Sheridan wrote: [/snip] :p XSL(T) an xslt processor, along with an XSLT stylesheet, should be used to transform XML documents in to other XML, human readable or structured documents. DOM a class implementing the DOM interface should be used to traverse, analyse and

Re: [PHP] Parsing XML

2008-12-01 Thread Per Jessen
Ashley Sheridan wrote: >> Roughly like this: (this is from a project I'm currently working >> on). >> >> -- >> // create the xslt processor object >> if ( FALSE===($xp=new XSLTProcessor()) ) { print "unable to create >> xslt engine"; return FALSE; } >> >> // Load the XML source >> $

Re: [PHP] Parsing XML

2008-12-01 Thread Ashley Sheridan
On Mon, 2008-12-01 at 21:35 +0100, Per Jessen wrote: > Ashley Sheridan wrote: > > > I still disagree, as using XSL is essentially converting the XML to > > another format, > > Which is all you're doing when you're extracting parts of an XML > document. > > > which is then being used by PHP. X

Re: [PHP] Parsing XML

2008-12-01 Thread Per Jessen
Ashley Sheridan wrote: > I still disagree, as using XSL is essentially converting the XML to > another format, Which is all you're doing when you're extracting parts of an XML document. > which is then being used by PHP. XSL is great for some tasks, but for > this, I think having a good PHP X

Re: [PHP] Parsing XML

2008-12-01 Thread Ashley Sheridan
On Mon, 2008-12-01 at 11:28 +0100, Per Jessen wrote: > Peter Ford wrote: > > > Per Jessen wrote: > >> > >> That's cool, but XSL is still the more appropriate tool IMO. It does > >> exactly what you need - it parses and validates the XML document, > >> allows you to extract the bits you need and

Re: [PHP] Parsing XML

2008-12-01 Thread Per Jessen
Peter Ford wrote: > Per Jessen wrote: >> >> That's cool, but XSL is still the more appropriate tool IMO. It does >> exactly what you need - it parses and validates the XML document, >> allows you to extract the bits you need and in virtually any format >> you need - which could be a text documen

Re: [PHP] Parsing XML

2008-12-01 Thread Peter Ford
Per Jessen wrote: > Ashley Sheridan wrote: > >> On Fri, 2008-11-28 at 10:15 +0100, Per Jessen wrote: >>> Ashley Sheridan wrote: >>> Do any of you have a copy of this extension, or failing that, a suggestion of how I can parse XML files without having to install anything on the remot

Re: [PHP] Parsing XML

2008-11-29 Thread Ashley Sheridan
On Fri, 2008-11-28 at 20:39 +0100, Per Jessen wrote: > Andrew Ballard wrote: > > >> XSL will only allow me to convert it into a different document > >> format, which is not what I want as I need to keep a local copy of > >> information in a database for searching and sorting purposes. Nathans > >>

Re: [PHP] Parsing XML

2008-11-28 Thread Per Jessen
Andrew Ballard wrote: >> XSL will only allow me to convert it into a different document >> format, which is not what I want as I need to keep a local copy of >> information in a database for searching and sorting purposes. Nathans >> class allows me to have the entire document put into an array tr

Re: [PHP] Parsing XML

2008-11-28 Thread Andrew Ballard
On Fri, Nov 28, 2008 at 5:45 AM, Ashley Sheridan <[EMAIL PROTECTED]> wrote: > On Fri, 2008-11-28 at 10:15 +0100, Per Jessen wrote: >> Ashley Sheridan wrote: >> >> > Do any of you have a copy of this extension, or failing that, a >> > suggestion of how I can parse XML files without having to install

Re: [PHP] Parsing XML

2008-11-28 Thread Ashley Sheridan
On Fri, 2008-11-28 at 13:14 +0100, Per Jessen wrote: > Ashley Sheridan wrote: > > > On Fri, 2008-11-28 at 10:15 +0100, Per Jessen wrote: > >> Ashley Sheridan wrote: > >> > >> > Do any of you have a copy of this extension, or failing that, a > >> > suggestion of how I can parse XML files without h

Re: [PHP] Parsing XML

2008-11-28 Thread Per Jessen
Ashley Sheridan wrote: > On Fri, 2008-11-28 at 10:15 +0100, Per Jessen wrote: >> Ashley Sheridan wrote: >> >> > Do any of you have a copy of this extension, or failing that, a >> > suggestion of how I can parse XML files without having to install >> > anything on the remote server, as I do not ha

Re: [PHP] Parsing XML

2008-11-28 Thread Ashley Sheridan
On Fri, 2008-11-28 at 10:15 +0100, Per Jessen wrote: > Ashley Sheridan wrote: > > > Do any of you have a copy of this extension, or failing that, a > > suggestion of how I can parse XML files without having to install > > anything on the remote server, as I do not have that level off access > > to

Re: [PHP] Parsing XML

2008-11-28 Thread Per Jessen
Ashley Sheridan wrote: > Do any of you have a copy of this extension, or failing that, a > suggestion of how I can parse XML files without having to install > anything on the remote server, as I do not have that level off access > to it. Parsing XML is best done with XSL - if that's out of the qu

Re: [PHP] Parsing out excel's .xls textboxes?

2008-11-13 Thread Nitsan Bin-Nun
It is binary file, saved from office 2003. There is no way of changing the office version (so I can save it as .xml of something) so I have to figure out how to parse these textboxes. Nitsan On 11/14/08, Ashley Sheridan <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-11-14 at 00:45 +0200, Nitsan Bin-

Re: [PHP] Parsing out excel's .xls textboxes?

2008-11-13 Thread Ashley Sheridan
On Fri, 2008-11-14 at 00:45 +0200, Nitsan Bin-Nun wrote: > Hi, > I have an excel parser I found out on the net a while ago. > It does a really great job untill now. > I need to parse out an excel file (.xls) with excel's textboxes in it, > I want to fetch the textboxes content from the .xls somehow

Re: [PHP] Parsing URLs

2008-10-28 Thread Yeti
One could also abuse basename and pathinfo. Works in PHP4+ http://www.domain.com/page/file/'; $pathinfo = pathinfo($uri); $webpageaccess = array(); $webpageaccess[1] = $webpageaccess[2] = ''; if (isset($pathinfo['basename'])) $webpageaccess[1] = $pathinfo['basename']; if (isset($pathinfo['dirname'

Re: [PHP] Parsing URLs

2008-10-27 Thread Eric Butera
On Mon, Oct 27, 2008 at 10:04 PM, Ron Piggott <[EMAIL PROTECTED]> wrote: > I would like to parse the URLs in the values after the domain name. > > The URLs are the results of mod re-write statements. > > Example 1: > > http://www.domain.com/page/file/ > > The desired results would be: > $web_page_a

Re: [PHP] parsing form with a website question...

2008-08-14 Thread Robert Cummings
On Thu, 2008-08-14 at 21:39 -0400, tedd wrote: > At 7:57 PM -0400 8/14/08, Robert Cummings wrote: > >On Thu, 2008-08-14 at 15:47 -0700, bruce wrote: > >-snip- That's 100 billion bytes AKA 100 metric > >gigabytes... remember that was just 1 form. > > > >Cheers, > >Rob. > > Killjoy. :-) > > He cou

Re: [PHP] parsing form with a website question...

2008-08-14 Thread Chris
bruce wrote: rob, i'm fully aware of the issues, and for the targeted sites that i'm focusing on, i can employ strategies to prune the tree... but the overall issue is that i'm looking for a tool/app/process that does what i've described. the basic logic is that the app needs to use a config fi

Re: [PHP] parsing form with a website question...

2008-08-14 Thread tedd
At 7:57 PM -0400 8/14/08, Robert Cummings wrote: On Thu, 2008-08-14 at 15:47 -0700, bruce wrote: -snip- That's 100 billion bytes AKA 100 metric gigabytes... remember that was just 1 form. Cheers, Rob. Killjoy. :-) He could have had a lot of fun figuring that out. tedd -- --- http://spe

RE: [PHP] parsing form with a website question...

2008-08-14 Thread bruce
r the querystrings to the form action... ain't life grand!! thanks... -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2008 4:57 PM To: bruce Cc: php-general@lists.php.net Subject: Re: [PHP] parsing form with a website question... On Th

Re: [PHP] parsing form with a website question...

2008-08-14 Thread Robert Cummings
On Thu, 2008-08-14 at 15:47 -0700, bruce wrote: > Hi guys... > > Got a question that I figured I'd ask before I reinvent the wheel. > > A basic website has a form, or multiple forms. within the form, there might > be multiple elements (lists/select statements, etc...). each item would have > a v

Re: [PHP] parsing text for special characters

2007-11-29 Thread Jochem Maas
Adam Williams wrote: > I've got an html form, and I have PHP parse the message variables for > special characters so when I concatenate all off the message variables > together, if a person has put in a ' " or other special character, it exactly how are ' and " special inside the body of an email

Re: [PHP] parsing text for special characters

2007-11-29 Thread mike
On 11/29/07, Adam Williams <[EMAIL PROTECTED]> wrote: > I've got an html form, and I have PHP parse the message variables for > special characters so when I concatenate all off the message variables > together, if a person has put in a ' " or other special character, it > won't break it when it use

RE: [PHP] Parsing XML with DTD

2007-11-22 Thread Andrés Robinet
> -Original Message- > From: Skip Evans [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 22, 2007 5:35 PM > To: Jochem Maas > Cc: PHP-General > Subject: Re: [PHP] Parsing XML with DTD > > Hey Jochem & all, > > Thanks much for this tip. I will c

Re: [PHP] Parsing XML with DTD

2007-11-22 Thread Skip Evans
Hey Jochem & all, Thanks much for this tip. I will check it out. A little further reading looks like PEAR provides some XML and DTD capabilities? Anyone have any experience with this? Also, the reason I asked about the DTD is that these XML files are really extensive, providing lots of var

Re: [PHP] Parsing XML with DTD

2007-11-22 Thread Jochem Maas
Skip Evans wrote: > Hey all, > > I've been asked if it's possible to parse XML files given a DTD file > that describes the elements within it, so I've been looking through the > docs at php.net. > > So far I've found this: > > http://us.php.net/manual/en/ref.xml.php > > Which has some samples o

Re: [PHP] Parsing XML with DTD

2007-11-22 Thread Per Jessen
Skip Evans wrote: > I've been asked if it's possible to parse XML files given a DTD file > that describes the elements within it, Yes it is. > Which has some samples on, but nothing that I see > will take a DTD file and parse the XML accordingly. > I'm thinking something like this is probably

Re: [PHP] Parsing Strings

2007-10-15 Thread Philip Thompson
On 10/15/07, Richard Heyes <[EMAIL PROTECTED]> wrote: > > Philip Thompson wrote: > > ... > > $str = 'thisIsAStringIHave'; > > echo ucfirst(preg_replace('/([A-Z])/', ' $1', $str)); > ?> > > HTH Ha! I knew there was a much easier way. My brain is still not working this Monday morning

Re: [PHP] Parsing Strings

2007-10-15 Thread Richard Heyes
Philip Thompson wrote: > ... HTH -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing Strings

2007-10-15 Thread Andrew Ballard
On 10/15/07, Philip Thompson <[EMAIL PROTECTED]> wrote: > Hi. > > Before I try and reinvent the wheel, I thought I'd query the list. I want to > take this string: > > thisIsAStringIHave > > and turn it into: > > This Is A String I Have > > Essentially, I want to capitalize the first letter (ucfirst

Re: [PHP] Parsing Poor XML into to PHP

2007-09-17 Thread Gavin M. Roy
I'm not sure, but perhaps tidy can fix the broken elements of the xml file... I don't remember if it will close your quotes or just drop the element from the tag. On 9/17/07, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > > Pour examples of xml, but this is what I want to do. I have a quiz. > >

Re: [PHP] Parsing Variables Inside a String

2007-08-15 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Hi, is there a function that can parse variables within a string? For example: $good_day = 'The'; $fr['iop'] = "y're crazy!"; $new = '$good_day$fr['iop']'; echo TheFunctionIRequest($new); // They're crazy! Thanks! One thing to add to what everybody else is saying,

Re: [PHP] Parsing Variables Inside a String

2007-08-15 Thread heavyccasey
anchanworld.com/ > http://webdirectory.sanchanworld.com - Submit your website URL > http://webhosting.sanchanworld.com - Choose your best web hosting plan > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 15, 2007 12:41 PM

RE: [PHP] Parsing Variables Inside a String

2007-08-15 Thread Sanjeev N
ng plan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 15, 2007 12:41 PM To: Chris Cc: php-general@lists.php.net Subject: Re: [PHP] Parsing Variables Inside a String I need to get the variable names from a database. On 8/15/07, Chris <[

RE: [PHP] Parsing Variables Inside a String

2007-08-15 Thread Sanjeev N
$new = '$good_day$fr['iop']'; This will give you error... Instead if you try in this way as follows $new = "$good_day$fr['iop']"; or $new = $good_day.$fr['iop']; It will include the "They're carzy!" in the $new variable.. Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sa

Re: [PHP] Parsing Variables Inside a String

2007-08-15 Thread heavyccasey
I need to get the variable names from a database. On 8/15/07, Chris <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, is there a function that can parse variables within a string? > > > > For example: > > > > $good_day = 'The'; > > $fr['iop'] = "y're crazy!"; > > > > $new = '$good_day$

Re: [PHP] Parsing Variables Inside a String

2007-08-15 Thread Chris
[EMAIL PROTECTED] wrote: Hi, is there a function that can parse variables within a string? For example: $good_day = 'The'; $fr['iop'] = "y're crazy!"; $new = '$good_day$fr['iop']'; echo TheFunctionIRequest($new); // They're crazy! Well this: echo $good_day . $fr['iop']; will do what you sh

Re: [PHP] Parsing CSV files

2007-04-28 Thread Edward Vermillion
On Apr 28, 2007, at 2:59 PM, Richard Lynch wrote: On Fri, April 27, 2007 5:25 pm, Fernando Cosso wrote: One word: explode :D Two Words: Quotes, Commas :-p I think I wrote a "parser" a while back that properly handled commas in quotes for csv files. Probably did it the hard way but it wo

Re: [PHP] Parsing CSV files

2007-04-28 Thread Richard Lynch
On Fri, April 27, 2007 5:25 pm, Fernando Cosso wrote: > One word: explode > :D Two Words: Quotes, Commas :-p CSV is a nasty nested mess of escapes for escapes from somebody who clearly did NOT understand how to write a parser/grammar. Oh, yeah, it came from Microsoft, I think. That explains eve

Re: [PHP] Parsing CSV files

2007-04-27 Thread Todd Cary
Many thanks! I must be losing my eyesight! There it is and it works as expected...great. Todd Richard Lynch wrote: On Thu, April 26, 2007 3:39 pm, Todd Cary wrote: Is there a function that can parse a comma delimited file into an array? fgetcsv should work... -- Ariste Sof

Re: [PHP] Parsing CSV files

2007-04-27 Thread Richard Lynch
On Fri, April 27, 2007 2:44 pm, Tijnema ! wrote: > On 4/27/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> On Fri, April 27, 2007 1:58 pm, Tijnema ! wrote: >> > There are more interesting things to do than updating >> documentation ;) >> > >> > I was wanting to extend the CURLOPT_ constants, but it

Re: [PHP] Parsing CSV files

2007-04-27 Thread Tijnema !
On 4/27/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Fri, April 27, 2007 1:58 pm, Tijnema ! wrote: > There are more interesting things to do than updating documentation ;) > > I was wanting to extend the CURLOPT_ constants, but it seemed that > nobody had interest in that, so i didn't ... I b

Re: [PHP] Parsing CSV files

2007-04-27 Thread Richard Lynch
On Fri, April 27, 2007 1:58 pm, Tijnema ! wrote: > There are more interesting things to do than updating documentation ;) > > I was wanting to extend the CURLOPT_ constants, but it seemed that > nobody had interest in that, so i didn't ... I believe the issue here is that having the constants with

Re: [PHP] Parsing CSV files

2007-04-27 Thread Richard Lynch
On Fri, April 27, 2007 9:45 am, Daniel Brown wrote: > Maybe the PHP site itself should be Wiki-fied so that we could > just go > in ourselves and fix the errors. I don't see that happening any time > soon > though Gah. php.net as a Wikki would be a nightmare... If you *really* want to f

Re: [PHP] Parsing CSV files

2007-04-27 Thread Richard Lynch
On Thu, April 26, 2007 3:39 pm, Todd Cary wrote: > Is there a function that can parse a comma delimited file into an > array? fgetcsv should work... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah

Re: [PHP] Parsing CSV files

2007-04-27 Thread Tijnema !
On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: >> Tijnema ! wrote: >> > On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: >> >> Daniel Brown wrote: >> >> >Maybe the PHP site itself should be Wiki-fied so that we could >> >> just go >> >> >

Re: [PHP] Parsing CSV files

2007-04-27 Thread Stut
Tijnema ! wrote: On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: >> Daniel Brown wrote: >> >Maybe the PHP site itself should be Wiki-fied so that we could >> just go >> > in ourselves and fix the errors. I don't see that happening a

Re: [PHP] Parsing CSV files

2007-04-27 Thread Tijnema !
On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: >> Daniel Brown wrote: >> >Maybe the PHP site itself should be Wiki-fied so that we could >> just go >> > in ourselves and fix the errors. I don't see that happening any >> time soon >>

Re: [PHP] Parsing CSV files

2007-04-27 Thread Stut
Tijnema ! wrote: On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: >Maybe the PHP site itself should be Wiki-fied so that we could just go > in ourselves and fix the errors. I don't see that happening any time soon > though There's nothing stopping you submitting patch

Re: [PHP] Parsing CSV files

2007-04-27 Thread Tijnema !
On 4/27/07, Stut <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: >Maybe the PHP site itself should be Wiki-fied so that we could just go > in ourselves and fix the errors. I don't see that happening any time soon > though There's nothing stopping you submitting patches to the documentati

Re: [PHP] Parsing CSV files

2007-04-27 Thread Daniel Brown
Yeah, that's why I followed-up with saying, "I don't see that happening any time soon though" Not only would you have unqualified people putting in bad (though not intentionally wrong) information, there would always be the presence of vandalism, as on any other Wiki. The serious probl

Re: [PHP] Parsing CSV files

2007-04-27 Thread Stut
Daniel Brown wrote: Maybe the PHP site itself should be Wiki-fied so that we could just go in ourselves and fix the errors. I don't see that happening any time soon though There's nothing stopping you submitting patches to the documentation mailing list. As far as I know they welcome d

  1   2   3   4   5   >