php-general Digest 20 Oct 2010 12:36:59 -0000 Issue 6997

2010-10-20 Thread php-general-digest-help
php-general Digest 20 Oct 2010 12:36:59 - Issue 6997 Topics (messages 308865 through 308882): Re: simple class constructor 308865 by: David McGlone 308866 by: David McGlone 308867 by: David Harkness 308868 by: Tommy Pham 308869 by: David McGlone

Re: [PHP] Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread richard gray
On 20/10/2010 05:47, Jonathan Sachs wrote: I've got a script which originally contained the following piece of code: foreach ( $objs as $obj ) { do_some_stuff($obj); } When I tested it, I found that on every iteration of the loop the last element of $objs was assigned the value of the

Re: [PHP] PHP stream_socket_client OpenSSL error (unknown ca)

2010-10-20 Thread Richard
Hello again, Just to say that I have tested the script on php.net manual that generates a cert and then trys to connect (slightly modified the end of file [removing the while(true) section to just test the connection]) and I get exactly the same error. Source :

[PHP] Unicode - Entitiy Encoding

2010-10-20 Thread Sebastian Detert
Hi all, I'm stuck with this problem: I am trying to convert a text with any kind of unicode characters to its octet and entity equivalents. For example: Ë is #203; as octet and Euml; as entity Đ is #272; as octet and Dstrok; as entity My code works fine for some characters ( Ë works fine,

[PHP] Error handler script

2010-10-20 Thread Teto
Hi, I've been wondering if there was any php project focusing on providing a neat php error handler ? Up to now, I've been coding mine but I've seen videos on the web where a guy was using a really impressive php error_handler. Of course I could code it but if there was something generic I could

RE: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread Tommy Pham
-Original Message- From: Gary [mailto:php-gene...@garydjones.name] Sent: Tuesday, October 19, 2010 11:38 PM To: php-general@lists.php.net Subject: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem Jonathan Sachs wrote: I've got a script which originally

Re: [PHP] Firs Day Of Week UNIX

2010-10-20 Thread Richard Quadling
On 19 October 2010 14:59, Don Wieland d...@dwdataconcepts.com wrote: Hi gang, I need a bailout. I have a fields called sys_first_day_of_week and the user can select one value which will be from a menu with these options: Monday Tuesday Wednesday Thursday Friday Saturday Sunday

[PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread Jonathan Sachs
On Wed, 20 Oct 2010 08:37:55 +0200, php-gene...@garydjones.name (Gary) wrote: Better. I can tell you how to solve it: $a = array('a', 'b','c'); foreach($a as $row){ //you don't have to do anything here } unset($row); // THIS IS KEY! print_r($a); foreach($a as

[PHP] Weird Behavior

2010-10-20 Thread Don Wieland
Little help please ;) $CD = 1287583899 $q1s = 1283313600 $q1e = 1291093200 $q2s = 1291179600 $q2e = 1298869200 $q3s = 1298955600 $q3e = 1306814400 $q4s = 1306900800 $q4e = 1314763200 Why does the following not return the value 1 in the $qCur var // Current Quarter if($CD = $q1s $CD = $q1e)

Re: [PHP] Weird Behavior

2010-10-20 Thread Daniel Brown
On Wed, Oct 20, 2010 at 10:35, Don Wieland d...@dwdataconcepts.com wrote: Little help please ;) $CD = 1287583899 $q1s = 1283313600 $q1e = 1291093200 $q2s = 1291179600 $q2e = 1298869200 $q3s = 1298955600 $q3e = 1306814400 $q4s = 1306900800 $q4e = 1314763200 Why does the following not

Re: [PHP] Weird Behavior

2010-10-20 Thread Alexander Schrijver
On Wed, Oct 20, 2010 at 07:35:26AM -0700, Don Wieland wrote: Little help please ;) $CD = 1287583899 $q1s = 1283313600 $q1e = 1291093200 $q2s = 1291179600 $q2e = 1298869200 $q3s = 1298955600 $q3e = 1306814400 $q4s = 1306900800 $q4e = 1314763200 Why does the following not return the

RE: [PHP] Weird Behavior

2010-10-20 Thread Steven Buehler
it returns 1 for me. Did you put the simicolon after the values? $CD = 1287583899; $q1s = 1283313600; $q1e = 1291093200; $q2s = 1291179600; $q2e = 1298869200; $q3s = 1298955600; $q3e = 1306814400; $q4s = 1306900800; $q4e = 1314763200; -Original Message- From: Don Wieland

[PHP] Calendar Logic Help

2010-10-20 Thread Floyd Resler
I'm having problems getting my head around some login for a calendar. Specifically, the problem is drawing weekly views for events that span multiple days. I've gotten it so that if an event starts in the week being viewed, the days draw correctly for the remainder of the week. However, if

RE: [PHP] Calendar Logic Help

2010-10-20 Thread Tommy Pham
-Original Message- From: Floyd Resler [mailto:fres...@adex-intl.com] Sent: Wednesday, October 20, 2010 9:17 AM To: PHP Subject: [PHP] Calendar Logic Help I'm having problems getting my head around some login for a calendar. Specifically, the problem is drawing weekly views for

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread David Harkness
On Wed, Oct 20, 2010 at 5:00 AM, Tommy Pham tommy...@gmail.com wrote: Shouldn't that be $row = null since unset will remove the last value, not just removing the variable also, from the array whereas the $row = null will tell the reference pointer that it doesn't point to a value. No, that

Re: [PHP] Calendar Logic Help

2010-10-20 Thread Floyd Resler
On Oct 20, 2010, at 12:47 PM, Tommy Pham wrote: -Original Message- From: Floyd Resler [mailto:fres...@adex-intl.com] Sent: Wednesday, October 20, 2010 9:17 AM To: PHP Subject: [PHP] Calendar Logic Help I'm having problems getting my head around some login for a calendar.

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread Tommy Pham
On Wed, Oct 20, 2010 at 10:44 AM, David Harkness davi...@highgearmedia.com wrote: On Wed, Oct 20, 2010 at 5:00 AM, Tommy Pham tommy...@gmail.com wrote: Shouldn't that be $row = null since unset will remove the last value, not just removing the variable also, from the array whereas the $row =

[PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread Rico Secada
Hi. I am working on a small system where I am both trying to avoid code duplication and at the same time I am trying to keep the presentation logic separated from the application logic. I am using sessions and are avoiding headers already sent problem by keeping the HTML out of the application.

Re: [PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread David McGlone
On Thu, 2010-10-21 at 04:05 +0200, Rico Secada wrote: Hi. I am working on a small system where I am both trying to avoid code duplication and at the same time I am trying to keep the presentation logic separated from the application logic. I am using sessions and are avoiding headers

RE: [PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread Tommy Pham
-Original Message- From: David McGlone [mailto:da...@dmcentral.net] Sent: Wednesday, October 20, 2010 7:59 PM To: php-general@lists.php.net Subject: Re: [PHP] I need some thoughts on code duplication and separation On Thu, 2010-10-21 at 04:05 +0200, Rico Secada wrote: Hi. I