RE: [PHP] String eval assistance

2011-03-15 Thread Jack
> Here you're trying to access it as an array, which it's not, so the 'response' > key doesn't exist. In addition, you're looking for UPPER-CASE, whereas that's > not the case in your example variable. > Finally, you're checking to make sure that the string IS INDEED found, but > then printing

Re: [PHP] String eval assistance

2011-03-15 Thread Simon J Welsh
On 16/03/2011, at 10:34 AM, Jack wrote: > Hello All, > > > > I got some help on this yesterday, but somehow it's not consistant > > > > > > > $results = "3434approd34"; > > > > if(strpos($results['response'], 'APPROVED') !== false) { > > > > print "declined"; > > > > } else {

Re: [PHP] String eval assistance

2011-03-15 Thread Daniel Brown
On Tue, Mar 15, 2011 at 17:34, Jack wrote: > Hello All, > > > > I got some help on this yesterday, but somehow it's not consistant > > > > $results = "3434approd34"; Here you're defining the variable as a string. > if(strpos($results['response'], 'APPROVED') !== false) { Here you're tr

[PHP] String eval assistance

2011-03-15 Thread Jack
Hello All, I got some help on this yesterday, but somehow it's not consistant The thing is I cant get a consistant response, if it has approved anywhere in the results string, then it should be approved and if the results is APPROVD without the E it shold be delined. Am I doing

Re: [PHP] Deleting elements from the middle of an array

2011-03-15 Thread tedd
At 4:31 PM -0400 3/14/11, Paul M Foster wrote: Here's what I need to do: I have an indexed array, from which I need to delete elements in the middle. Once completed, the indexes should be numerically in sequence, as they were when I first encountered the array. That is: Before: $arr = array(0 =>

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Joel
You might want to take a look at the BC Math functions, which can perform operations on arbitrary length numbers. On Tue, Mar 15, 2011 at 12:31 PM, Ford, Mike wrote: >> -Original Message- >> From: Andy McKenzie [mailto:amckenz...@gmail.com] >> Sent: 15 March 2011 15:51 >> >> As it turns o

RE: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Ford, Mike
> -Original Message- > From: Andy McKenzie [mailto:amckenz...@gmail.com] > Sent: 15 March 2011 15:51 > > As it turns out, the most important lesson here is: "Don't trust > what > anyone tells you." The old server is 64-bit. The new server is > 32-bit. Once I stopped to check that mysel

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Daniel Brown
On Tue, Mar 15, 2011 at 12:26, Adam Richardson wrote: > > Hah! > > This was the list with the Alex. Too many lists, too few neurons. In the Facebook age, email really needs some sort of "I Agree" button. I'm right-on with you on that one, Adam. -- Network Infrastructure Manager http://www

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Adam Richardson
On Tue, Mar 15, 2011 at 12:21 PM, Daniel Brown wrote: > On Tue, Mar 15, 2011 at 12:18, Adam Richardson > wrote: > > > > My apologies: > > > > Nice detective work ANDY (sorry, Andy, see earlier note about my shabby > > memory.) I'd just replied to an Alex on another list. > > > > Sorry. > > D

Re: [PHP] Deleting elements from the middle of an array

2011-03-15 Thread Peter Lind
On Mar 15, 2011 5:05 PM, "Paul M Foster" wrote: > > On Tue, Mar 15, 2011 at 07:08:28AM +0100, Peter Lind wrote: > > >On Mar 15, 2011 4:10 AM, "Paul M Foster" <[1]pa...@quillandmouse.com> > >wrote: > >> > >> On Mon, Mar 14, 2011 at 10:14:53PM +0100, Peter Lind wrote: > >> > >

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Daniel Brown
On Tue, Mar 15, 2011 at 12:18, Adam Richardson wrote: > > My apologies: > > Nice detective work ANDY (sorry, Andy, see earlier note about my shabby > memory.) I'd just replied to an Alex on another list. > > Sorry. Don't be. He signs his emails as "Alex." I had to do a double-take before, t

Re: [PHP] Closing tab in Firefox

2011-03-15 Thread Marc Guay
Quick googling came up with this: http://www.yournewdesigner.com/css-experiments/javascript-window-close-firefox.html Maybe try the JS mailing list if that doesn't take you down the right road. PHP can't manipulate the browser. Marc -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] Closing tab in Firefox

2011-03-15 Thread Daniel Brown
On Tue, Mar 15, 2011 at 12:15, Alexis wrote: > > I have tried google and all I come up with is closing the entire browser and > not just a tab. > > Any suggestions really woudl be most appreciated That's a JavaScript question. PHP is only server-side, not client- (browser-) side. -- Netwo

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Adam Richardson
On Tue, Mar 15, 2011 at 12:15 PM, Adam Richardson wrote: > On Tue, Mar 15, 2011 at 11:50 AM, Andy McKenzie wrote: > >> > Now: I did a little more looking around this morning, and it looks >> > like I may well run into problems here given that I'm moving from a >> > 32-bit architecture to a 64-bit

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Adam Richardson
On Tue, Mar 15, 2011 at 11:50 AM, Andy McKenzie wrote: > > Now: I did a little more looking around this morning, and it looks > > like I may well run into problems here given that I'm moving from a > > 32-bit architecture to a 64-bit architecture. Bitwise math is still > > fairly obscure to me,

[PHP] Closing tab in Firefox

2011-03-15 Thread Alexis
Hi, I have a number of PHP scripts that I run purely on my own system and I am using Firefox, and currently get them to open new tabs each time they runwhat I would like to do is to close the tab once they have finished running, as if I am away for a few days I can end up with over 100 op

Re: [PHP] Deleting elements from the middle of an array

2011-03-15 Thread Paul M Foster
On Tue, Mar 15, 2011 at 07:08:28AM +0100, Peter Lind wrote: >On Mar 15, 2011 4:10 AM, "Paul M Foster" <[1]pa...@quillandmouse.com> >wrote: >> >> On Mon, Mar 14, 2011 at 10:14:53PM +0100, Peter Lind wrote: >> >> > On 14 March 2011 22:10, Paul M Foster <[2]pa...@quillandmouse

Re: [PHP] problem with if and exact match

2011-03-15 Thread Shawn McKenzie
On 03/15/2011 07:30 AM, Steve Staples wrote: > > Wouldn't this be better to use, as it is meant to search for the string > inside the string? (use use regex) > > if(stristr($name, 'Jackson')) > { > echo "String is in String"; > } > else > { > echo "Failed"; > } > > http://ca.php.net

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Andy McKenzie
> Now:  I did a little more looking around this morning, and it looks > like I may well run into problems here given that I'm moving from a > 32-bit architecture to a 64-bit architecture.  Bitwise math is still > fairly obscure to me, so it's likely that I'm overlooking something > obvious, but may

Re: [PHP] Deleting elements from the middle of an array

2011-03-15 Thread Jim Lucas
On 3/14/2011 2:02 PM, Jim Lucas wrote: > On 3/14/2011 1:31 PM, Paul M Foster wrote: >> Here's what I need to do: I have an indexed array, from which I need to >> delete elements in the middle. Once completed, the indexes should be >> numerically in sequence, as they were when I first encountered th

Re: [PHP] help with a safe mode snag

2011-03-15 Thread Daniel Brown
On Mon, Mar 14, 2011 at 21:12, Jack wrote: > Hello All, > > > > Im writing a script that creates a temp file which it then encrypts and > sends out in an email. > > This works 100% on servers that don't have safe mode, but this server with > safe mode doesn't understand it's all the same user. > >

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Andy McKenzie
On Tue, Mar 15, 2011 at 8:07 AM, Andy McKenzie wrote: > On Mon, Mar 14, 2011 at 11:39 PM, Adam Richardson > wrote: >>> >>> This one's got me stumped.  I >>> have the following line in a script: >>> >>> $this->bc = ($this->network | (~$this->netmask)) & 4294967295; >>> >>> $this->network and $thi

RE: [PHP] problem with if and exact match

2011-03-15 Thread Steve Staples
On Tue, 2011-03-15 at 01:20 -0400, Jack wrote: > Thanks everyone... great examples...works ( both methods ) > > Thanks! > Jack > > > -Original Message- > > From: Alexis Antonakis [mailto:ad...@antonakis.co.uk] > > Sent: Tuesday, March 15, 2011 1:10 AM > > To: Jack > > Subject: Re: [PH

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Andy McKenzie
On Mon, Mar 14, 2011 at 11:39 PM, Adam Richardson wrote: >> >> This one's got me stumped.  I >> have the following line in a script: >> >> $this->bc = ($this->network | (~$this->netmask)) & 4294967295; >> >> $this->network and $this->netmask should both be of type long, and I >> should wind up wit

Re: [PHP] php or juvascript convert IETF format to ISO08601

2011-03-15 Thread Simon J Welsh
On 15/03/2011, at 9:18 PM, Joce Jovanov wrote: > On Tue, Mar 15, 2011 at 12:44 AM, Simon J Welsh wrote: > >> On 15/03/2011, at 12:32 PM, Jordan wrote: >> >>> Hello Evrybody, >>> >>> Can i convert IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST") in >> ISO8601 format (ex: "2009-11-05T13:15:30Z

Re: [PHP] problem with if and exact match

2011-03-15 Thread FeIn
strpos example is much faster though On Tue, Mar 15, 2011 at 7:20 AM, Jack wrote: > Thanks everyone... great examples...works ( both methods ) > > Thanks! > Jack > > > -Original Message- > > From: Alexis Antonakis [mailto:ad...@antonakis.co.uk] > > Sent: Tuesday, March 15, 2011