Re: [PHP] Problems with array_push?

2013-05-07 Thread tamouse mailing lists
On Tue, May 7, 2013 at 9:42 PM, tamouse mailing lists wrote: > On Tue, May 7, 2013 at 4:28 PM, Jay Blanchard > wrote: >> [snip]Globals being used in a function. [/snip] >> >> *smacks forehead* > > > > It bites me all the time, too. (Might be worth a refactor to eliminate globals from this, in fa

Re: [PHP] Problems with array_push?

2013-05-07 Thread tamouse mailing lists
On Tue, May 7, 2013 at 4:28 PM, Jay Blanchard wrote: > [snip]Globals being used in a function. [/snip] > > *smacks forehead* It bites me all the time, too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] filesize question

2013-05-07 Thread tamouse mailing lists
On Tue, May 7, 2013 at 8:16 AM, Curtis Maurand wrote: > Hello, > I'm feeding a filename to a php script on the command line (command line > program). I run the following against it: > > $inputline = fread($inputfile, filesize($argv[1])); > > I'm getting an error complaining that the second parame

Re: [PHP] array_map() with multiple callback functions

2013-05-07 Thread Alex Nikitin
Something like: $cleanData = array_map(function($str){return strtolower(trim($str));}, $passedData); -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Tue, May 7, 2013 at 4:29 PM, George Langley wrote: > Hi all. I want t

[PHP] array_map() with multiple callback functions

2013-05-07 Thread George Langley
Hi all. I want to apply strtolower() AND trim() to all items in an array. But I don't see a way to call multiple callbacks with the array_map() function. Are my two choices the following: // 1) nesting two array_map() calls $cleanData = array_map('trim',(array_map('strtolower',$rawData))); // 2

Re: [PHP] Problems with array_push?

2013-05-07 Thread Jay Blanchard
[snip]Globals being used in a function. [/snip] *smacks forehead* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problems with array_push?

2013-05-07 Thread Larry Martell
On Tue, May 7, 2013 at 3:06 PM, Jay Blanchard wrote: > I know that I must be missing something really ridiculous, but when I > print_r these arrays they are empty. I have confirmed that $arrayElement is > properly formed, it just seems that array_push is not working. I know I have > done this befo

Re: [PHP] Problems with array_push?

2013-05-07 Thread Stuart Dallas
Globals being used in a function. -Stuart On Tue, May 7, 2013 at 11:06 PM, Jay Blanchard wrote: > I know that I must be missing something really ridiculous, but when I > print_r these arrays they are empty. I have confirmed that $arrayElement > is properly formed, it just seems that array_pu

[PHP] Problems with array_push?

2013-05-07 Thread Jay Blanchard
I know that I must be missing something really ridiculous, but when I print_r these arrays they are empty. I have confirmed that $arrayElement is properly formed, it just seems that array_push is not working. I know I have done this before, but I cannot find my older code. Can someone clear the

Re: [PHP] filesize question

2013-05-07 Thread ma...@behnke.biz
> Curtis Maurand hat am 7. Mai 2013 um 15:16 geschrieben: > > > Hello, > I'm feeding a filename to a php script on the command line (command line > program). I run the following against it: > > $inputline = fread($inputfile, filesize($argv[1])); mayve $inputline = fread($inputfile, filesize($

[PHP] filesize question

2013-05-07 Thread Curtis Maurand
Hello, I'm feeding a filename to a php script on the command line (command line program). I run the following against it: $inputline = fread($inputfile, filesize($argv[1])); I'm getting an error complaining that the second parameter can't be '0' any ideas? thanks, Curtis -- PHP General

Re: [PHP] ODBC

2013-05-07 Thread georg
but isnt there some yum command that will fix things for me (download if necessary, but I actually think the ODBC would be in the distribution of fedora ?) br georg - Original Message - From: "David OBrien" To: "georg" Cc: "PHP General" Sent: Monday, May 06, 2013 11:06 PM Subject: