php-general Digest 11 Nov 2011 06:13:18 -0000 Issue 7561

2011-11-10 Thread php-general-digest-help
php-general Digest 11 Nov 2011 06:13:18 - Issue 7561 Topics (messages 315629 through 315635): Re: Passing arguments to an internal function via array_map 315629 by: Simon J Welsh 315630 by: Marc Guay checking dates not working 315631 by: Marc Fromm 315632

Fwd: [PHP] delete and recreate

2011-11-10 Thread tamouse mailing lists
Hoisted on me own petard, as it were. Meant this to go to OP and list, not Jim. -- Forwarded message -- From: tamouse mailing lists tamouse.li...@gmail.com Date: Thu, Nov 10, 2011 at 3:25 AM Subject: Re: [PHP] delete and recreate To: Jim Lucas li...@cmsws.com On Wed, Nov 9,

[PHP] json_encode confusion

2011-11-10 Thread Bastien Koert
Morning all, I've been having some fun with converting a text data file import into a json object for storage. I have a text file that is pipe delimited coming in via an upload. The first row is the headers and the second row is the data. Using this code: $data = file(inline_Nov_8_2011.txt);

Re: [PHP] json_encode confusion

2011-11-10 Thread Dan Schaefer
On 11/10/2011 09:45 AM, Bastien Koert wrote: Morning all, I've been having some fun with converting a text data file import into a json object for storage. I have a text file that is pipe delimited coming in via an upload. The first row is the headers and the second row is the data. Using

Re: [PHP] json_encode confusion

2011-11-10 Thread DiRaven
On 11/10/2011 05:45 PM, Bastien Kurt wrote: Morning all, I've been having some fun with converting a text data file import into a json object for storage. I have a text file that is pipe delimited coming in via an upload. The first row is the headers and the second row is the data. Using this

Re: [PHP] json_encode confusion

2011-11-10 Thread DiRaven
On 11/10/2011 05:45 PM, Bastien Koert wrote: Can someone point me in the correct direction? It may be that I need to manually create the key names as an array first, which I was hoping to avoid since the file format coming from the client is still in some flux. ?php //$data =

[PHP] Passing arguments to an internal function via array_map

2011-11-10 Thread Marc Guay
Hi folks, I'm trying to convert the contents of an array from utf8 to utf16 (thanks for the headache MS Excel!). I originally created a user function that just ran the text through mb_convert_encoding($text,'utf-16','utf-8') but now I'm wondering if I can't just use the internal function

Re: [PHP] json_encode confusion

2011-11-10 Thread Jim Lucas
On 11/10/2011 6:45 AM, Bastien Koert wrote: Morning all, I've been having some fun with converting a text data file import into a json object for storage. I have a text file that is pipe delimited coming in via an upload. The first row is the headers and the second row is the data.

Re: [PHP] json_encode confusion

2011-11-10 Thread Matijn Woudt
On Thu, Nov 10, 2011 at 5:42 PM, Jim Lucas li...@cmsws.com wrote: On 11/10/2011 6:45 AM, Bastien Koert wrote: Morning all, I've been having some fun with converting a text data file import into a json object for storage. I have a text file that is pipe delimited coming in via an upload. The

Re: [PHP] Passing arguments to an internal function via array_map

2011-11-10 Thread Simon J Welsh
On 11/11/2011, at 5:10 AM, Marc Guay wrote: Hi folks, I'm trying to convert the contents of an array from utf8 to utf16 (thanks for the headache MS Excel!). I originally created a user function that just ran the text through mb_convert_encoding($text,'utf-16','utf-8') but now I'm

Re: [PHP] Passing arguments to an internal function via array_map

2011-11-10 Thread Marc Guay
You need to pass a second and third array to array_map() with the same number of elements as the first array. The arguments to the callback function are the elements from each array at the same offset. Wow, thanks for the clarification. I've decided to create my own function and use that

[PHP] checking dates not working

2011-11-10 Thread Marc Fromm
I have this bit of code to see if a date is greater or equal to a set date. echo(date(m/d/Y,strtotime($jobs_effective_start)));// displays entered date of 01/03/2012 echo(date(m/d/Y,strtotime(WSOFFBEGIN))); // displays set date of 09/16/2011 if (!(date(m/d/Y,strtotime($jobs_effective_start)) =

Re: [PHP] checking dates not working

2011-11-10 Thread Simon J Welsh
On 11/11/2011, at 11:35 AM, Marc Fromm wrote: I have this bit of code to see if a date is greater or equal to a set date. echo(date(m/d/Y,strtotime($jobs_effective_start)));// displays entered date of 01/03/2012 echo(date(m/d/Y,strtotime(WSOFFBEGIN))); // displays set date of 09/16/2011

Re: [PHP] checking dates not working

2011-11-10 Thread tamouse mailing lists
On Thu, Nov 10, 2011 at 4:35 PM, Marc Fromm marc.fr...@wwu.edu wrote: I have this bit of code to see if a date is greater or equal to a set date. echo(date(m/d/Y,strtotime($jobs_effective_start)));// displays entered date of 01/03/2012 echo(date(m/d/Y,strtotime(WSOFFBEGIN))); // displays set

Re: [PHP] json_encode confusion

2011-11-10 Thread tamouse mailing lists
On Thu, Nov 10, 2011 at 11:24 AM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Nov 10, 2011 at 5:42 PM, Jim Lucas li...@cmsws.com wrote: On 11/10/2011 6:45 AM, Bastien Koert wrote: Morning all, I've been having some fun with converting a text data file import into a json object for storage.

Re: [PHP] Headers already sent

2011-11-10 Thread Larry Garfield
Perhaps your server is configured to have output buffering enabled by default? Check php.ini / phpinfo(). --Larry Garfield On 11/11/2011 12:12 AM, Kranthi Krishna wrote: Hi all, I am missing something pretty obvious here. The PHP Manual says Remember that header() must be called before any

Re: [PHP] Headers already sent

2011-11-10 Thread Kranthi Krishna
Hi, Perhaps your server is configured to have output buffering enabled by default Thanks. That was the problem. I spent a day trying to debug this. Kranthi. http://goo.gl/e6t3 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php