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

[PHP] parsing select multiple="multiple"

2013-02-18 Thread John Taylor-Johnston
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: {echo "selected";} ?>>1 {echo "selec

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

[PHP] Parsing the From field

2011-11-19 Thread Ron Piggott
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 name a business or department is given instead of a personal name - If the

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

[PHP] Parsing a simple sql string in php

2011-05-06 Thread Ashley Sheridan
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 idea is to produce a nice looking page giving details of u

[PHP] Parsing a phrase

2010-12-12 Thread Rick Dwyer
Hello all. I have a page where the user can enter a search phrase and upon submitting, the search phrase is queried in MySQL. However, I need to modify is so each word in the phrase is searched for... not just the exact phrase. So, "big blue hat" will return results like: "A big hat - bl

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

[PHP] Parsing JSON; back-slash problem

2009-12-15 Thread Andrew Burgess
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.stringify() on the object, which logs to the console as this: {"employees":

Re: [PHP] Re: newbie question - php parsing

2009-07-23 Thread Sebastiano Pomata
Thanks, it's now much more clear. I thought that html parts outside php tags were just dumped to output, no matter of if-else statements and other conditions. I was *definitely* wrong 2009/7/23 Peter Ford : > In response to Sebastiano: > > There would be not much point in using something like PHP

[PHP] Re: newbie question - php parsing

2009-07-23 Thread Peter Ford
João Cândido de Souza Neto wrote: > You made a mistake in your code: > > > > must be: > > > Not necessarily: what if you have function the_title() { echo "Title"; } for example... In response to Sebastiano: There would be not much point in using something like PHP if it ignore

[PHP] Re: newbie question - php parsing

2009-07-22 Thread Shawn McKenzie
João Cândido de Souza Neto wrote: > You made a mistake in your code: > > > > must be: > > > I haven't used worpress in a long time, but the the_title() function might echo the title unless you pass the FALSE parameter, in which case it just returns it. -- Thanks! -Shawn http://www.spidea

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Martin Scotta
This is how I'd write this snippet ', $title, ''; } ?> On Wed, Jul 22, 2009 at 6:31 PM, Lenin wrote: > Ted Turner > - > "Sports is like a war without the killing." > > 2009/7/23 Shane Hill > > > 2009/7/22 João Cândido

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Lenin
Ted Turner - "Sports is like a war without the killing." 2009/7/23 Shane Hill > 2009/7/22 João Cândido de Souza Neto > > > You made a mistake in your code: > > > > > > > > must be: > > > > > > > Short tag and not recommended

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Shane Hill
2009/7/22 João Cândido de Souza Neto > You made a mistake in your code: > > > > must be: > > also works. -Shane > > > -- > João Cândido de Souza Neto > SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS > Fone: (0XX41) 3033-3636 - JS > www.siens.com.br > > "Sebastiano Pomata" escreveu na men

[PHP] Re: newbie question - php parsing

2009-07-22 Thread Jo�o C�ndido de Souza Neto
You made a mistake in your code: must be: -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br "Sebastiano Pomata" escreveu na mensagem news:70fe20d60907221355m3fa49a75ua053d2f1b9aca...@mail.gmail.com... > Hi all, > > A lit

[PHP] newbie question - php parsing

2009-07-22 Thread Sebastiano Pomata
Hi all, A little doubt caught me while I was writing this snippet of code for a wordpress template: I always thought that php was called only between the tags, and I'm pretty sure that's right, while HTML code was simply wrote in document as is, without further logic. Now, I can't figure out

[PHP] Parsing of forms

2009-05-16 Thread Daniele Grillenzoni
I noticed that php's way to fill $_GET and $_POST is particularly inefficient when it comes to handling multiple inputs with the same name. This basically mean that every in order to function properly needs to have a name ending in '[]'. Wouldn't it be easier to also make it so that any elem

[PHP] Parsing of forms

2009-05-16 Thread Daniele Grillenzoni
I noticed that php's way to fill $_GET and $_POST is particularly inefficient when it comes to handling multiple inputs with the same name. This basically mean that every in order to function properly needs to have a name ending in '[]'. Wouldn't it be easier to also make it so that any elem

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 >>&g

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 &g

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"

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_

[PHP] Parsing HTML href-Attribute

2009-01-15 Thread Edmund Hertle
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 = ''; I tried using regular expressions but my knowledge of RegEx is very limited. Things to consider: - $string could be quite long but my concern are

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

AW: [PHP] Parsing Strings

2008-12-05 Thread Konrad Priemer
Oups, sorry mistake by copy & paste ;-) On Sa 06.12.2008 01:30 Jason wrote: > Can you explain how to do an address now into City, State, Zip > Like: cortland, ny 13045 $string = "cortland, ny 13045"; $search = array(", ", ","); $replace = array(" ", " "); $newString = str_rep

Re: AW: [PHP] Parsing Strings

2008-12-05 Thread Jason Todd Slack-Moehrle
Conny, Can you explain how to do an address now into City, State, Zip Like: cortland, ny 13045 $string = "cortland, ny 13045"; $search = array(", ", ","); $replace = array(" ", " "); $newString = str_replace($search, $replace, $string); $array = explode(" ", $newString); Ah ha! Nice that ma

AW: AW: [PHP] Parsing Strings

2008-12-05 Thread Konrad Priemer
Hi, On Sa 06.12.2008 01:30 Jason wrote: > Can you explain how to do an address now into City, State, Zip > Like: cortland, ny 13045 Test this: $string = "cortland, ny 13045"; $search = array(", ", ","); # if there is no space after the comma, we make this ;-) $replace = array(" ", " "); $newStr

Re: AW: [PHP] Parsing Strings

2008-12-05 Thread Jason Todd Slack-Moehrle
Konrad, On Dec 5, 2008, at 4:22 PM, Konrad Priemer wrote: $array = explode(" ", "Jason Slack"); Awesome, thanks, yup that does it. Can you explain how to do an address now into City, State, Zip Like: cortland, ny 13045 It has a comma and a space! -Jason -- PHP General Mailing List (htt

AW: [PHP] Parsing Strings

2008-12-05 Thread Konrad Priemer
Hi, Jason wrote: > I have a string that is: Jason Slack > and I want it broken at the space so i get Jason and then Slack explode or split can do this. $array = explode(" ", "Jason Slack"); Array ( [0] => Jason [1] => Slack ) Greetings from Stuttgart Conny --- Firma Konrad Priemer O

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

[PHP] Parsing Strings

2008-12-05 Thread Jason Todd Slack-Moehrle
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 then Slack I am looking at parse_str, but I dont get how to do it with a space. The example is using []=. Then I want to assign like: $fname = "Jason"; $lname

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

[PHP] Parsing XML

2008-11-27 Thread Ashley Sheridan
Hi All, I've run into a bit of a problem. I need to parse some fairly detailed XML files from a remote website. I'm pulling in the remote XML using curl, and that bit is working fine. The smaller XML documents were easy to parse with regular expressions, as I only needed bit of information out of

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

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

2008-11-13 Thread Nitsan Bin-Nun
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. I have no idea where to look out for this, I have even considere

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

[PHP] Parsing URLs

2008-10-27 Thread Ron Piggott
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_access[1] = "file" Example 2: http://www.domain.com/page/file/2/ The desired resu

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

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

2008-08-14 Thread bruce
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 varname, which would in turn be used as part of the form action

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

[PHP] parsing text for special characters

2007-11-29 Thread Adam Williams
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 used in mail($to, "MMH Suggestion", "$message", "$headers");

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

  1   2   3   4   5   6   7   >