php-general Digest 15 Mar 2011 09:39:59 -0000 Issue 7227

2011-03-15 Thread php-general-digest-help
php-general Digest 15 Mar 2011 09:39:59 - Issue 7227 Topics (messages 311837 through 311857): Re: Deleting elements from the middle of an array 311837 by: Peter Lind 311838 by: Marc Guay 311839 by: Jim Lucas 311840 by: Paul M Foster 311841 by: Peter

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

2011-03-15 Thread Peter Lind
On Mar 15, 2011 4:10 AM, Paul M Foster 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 pa...@quillandmouse.com wrote: [snip] Remove the elements, then use sort(). I've given a simplified example. The

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 jacklistm...@gmail.com wrote: Thanks everyone... great examples...works ( both methods ) Thanks! Jack -Original Message- From: Alexis Antonakis [mailto:ad...@antonakis.co.uk] Sent: Tuesday,

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 si...@welsh.co.nz 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] 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 simples...@gmail.com 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 with

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: [PHP] problem

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 amckenz...@gmail.com wrote: On Mon, Mar 14, 2011 at 11:39 PM, Adam Richardson simples...@gmail.com wrote: This one's got me stumped.  I have the following line in a script: $this-bc = ($this-network | (~$this-netmask)) 4294967295;

Re: [PHP] help with a safe mode snag

2011-03-15 Thread Daniel Brown
On Mon, Mar 14, 2011 at 21:12, Jack jacklistm...@gmail.com 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

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 the

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 maybe

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; }

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.com wrote:

[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

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 amckenz...@gmail.comwrote: 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

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 simples...@gmail.comwrote: On Tue, Mar 15, 2011 at 11:50 AM, Andy McKenzie amckenz...@gmail.comwrote: 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

Re: [PHP] Closing tab in Firefox

2011-03-15 Thread Daniel Brown
On Tue, Mar 15, 2011 at 12:15, Alexis phplis...@antonakis.co.uk 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-

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

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 simples...@gmail.com 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

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 pa...@quillandmouse.com 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 Adam Richardson
On Tue, Mar 15, 2011 at 12:21 PM, Daniel Brown danbr...@php.net wrote: On Tue, Mar 15, 2011 at 12:18, Adam Richardson simples...@gmail.com 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.

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 simples...@gmail.com 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. -- /Daniel P. Brown Network

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 myself, it all

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 m.f...@leedsmet.ac.uk wrote: -Original Message- From: Andy McKenzie [mailto:amckenz...@gmail.com] Sent: 15 March 2011 15:51

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] 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 { print approved;