php-general Digest 14 Jun 2012 11:55:30 -0000 Issue 7853

2012-06-14 Thread php-general-digest-help
php-general Digest 14 Jun 2012 11:55:30 - Issue 7853 Topics (messages 318231 through 318231): global array 318231 by: Jeff Burcher Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail:

[PHP] global array

2012-06-14 Thread Jeff Burcher
Hi, I am running PHP 5.4 on IIs 6 on a Windows SBS 2003 server. Here is a streamlined version of the code I am dealing with. I tried to trim as much as possible to only show code that deals with my issue. The main issue I think I am having is the global array statement within the function is

Re: [PHP] global array

2012-06-14 Thread ma...@behnke.biz
Jeff Burcher j...@allredmetal.com hat am 14. Juni 2012 um 13:55 geschrieben: function Part_BOM($PartID, $need, $phase) { global $Invreq; uppercase R !!! And much better is adding it as another parameter and inject it: function Part_BOM($PartID, $need, $phase, $InvReq)

RE: [PHP] global array

2012-06-14 Thread Jeff Burcher
You're a genius!! Thank you. Uppercase 'R', sheesh. PHP is sooo picky. I worked for two days trying to figure that one out. Anyway, for future reference, you can pass the entire array as a variable like that?? and do you know if the '+=' statement will create an array entry if one doesn't

[PHP] Re: how to walk async recursively over an object, doing work (in right order) per leaf

2012-06-14 Thread rene7705
I think I've got it figured out now.. My solution is to async build up a flat list of items (from the recursive object) to process first, then do another async loop (which I'll build soon) to do the work per item, and when that's done, replace the placeholder with the result. This code works on

[PHP] Re: how to walk async recursively over an object, doing work (in right order) per leaf

2012-06-14 Thread rene7705
oops; printNextLevel : function (pvCmd) { if ( typeof pvCmd.val == 'object' typeof pvCmd.val.hmStats == 'object' typeof pvCmd.val.hmData == 'object' ) { //if (pvCmd.keyValueName pvCmd.keyValueName!='')

Re: [PHP] global array

2012-06-14 Thread Jim Giner
Yes - PHP is very picky. Hence I never capitalize anything! I use underscores to make varnames more understandable, as in $inv_req -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] global array

2012-06-14 Thread Al
On 6/14/2012 12:49 PM, Jim Giner wrote: Yes - PHP is very picky. Hence I never capitalize anything! I use underscores to make varnames more understandable, as in $inv_req There is another nice custom e.g. $invReg it's easy to read and it doesn't conflict with PHP syntax for some

[PHP] add one day to DateTime based on timestamp

2012-06-14 Thread Shailesh N. Humbad
Hello, When I create a DateTime object from a UNIX timestamp, and then add a one day interval, PHP adds 25 hours instead of 24. Is this a bug, or something to do with the time zones? Here are the commands I'm running from my shell: -- $ date Wed Jun 13 06:08:24 PDT 2012 $ php -r

Re: [PHP] global array

2012-06-14 Thread Jim Giner
Al n...@ridersite.org wrote in message news:6b.c0.39100.4ef1a...@pb1.pair.com... On 6/14/2012 12:49 PM, Jim Giner wrote: Yes - PHP is very picky. Hence I never capitalize anything! I use underscores to make varnames more understandable, as in $inv_req There is another nice custom e.g.

Re: [PHP] global array

2012-06-14 Thread Ashley Sheridan
On Thu, 2012-06-14 at 15:13 -0400, Jim Giner wrote: Al n...@ridersite.org wrote in message news:6b.c0.39100.4ef1a...@pb1.pair.com... On 6/14/2012 12:49 PM, Jim Giner wrote: Yes - PHP is very picky. Hence I never capitalize anything! I use underscores to make varnames more

Re: [PHP] global array

2012-06-14 Thread Jim Giner
See - I didn't even notice he used camel-case - I thought he typed the same thing that got the OP in trouble. See how difficult that custom is? That's why for any case sensitive syntax, I stick to all lower case to avoid just that kind of bug-a-boo. -- PHP General Mailing List

[PHP] Re: php form action breaks script

2012-06-14 Thread David Robley
Tim Dunphy wrote: Hello list, I was just wondering if I could get some opinions on a snippet of code which breaks a php web page. First the working code which is basically an html form being echoed by php: if ($output_form) { echo 'br /br /form action=sendemail.php method=post

Re: [PHP] Re: php form action breaks script

2012-06-14 Thread Paul Halliday
On Thu, Jun 14, 2012 at 10:17 PM, David Robley robl...@aapt.net.au wrote: Tim Dunphy wrote: Hello list,  I was just wondering if I could get some opinions on a snippet of code which breaks a php web page.  First the working code which is basically an html form being echoed by  php: if