Re: [PHP] Serving an image

2012-10-16 Thread viper
On Tue, Oct 16, 2012 at 7:40 AM, Jan Ehrhardt php...@ehrhardt.nl wrote: Many receiving e-mail clients will not show external images. External images are used by spammers to trach if a message is read. true; you could embed images in email..

Re: [PHP] Serving an image

2012-10-16 Thread ma...@behnke.biz
viper recursivepoin...@gmail.com hat am 16. Oktober 2012 um 08:54 geschrieben: On Tue, Oct 16, 2012 at 7:40 AM, Jan Ehrhardt php...@ehrhardt.nl wrote: Many receiving e-mail clients will not show external images. External images are used by spammers to trach if a message is read. true;

Re: [PHP] SNMP via PHP

2012-10-16 Thread Lester Caine
Tom Rogers wrote: Did you see this:http://www.php.net/manual/en/book.snmp.php Once you know the answer, then the question is easy ... In order to use your link one has to know how SNMP works and understand things like 'object_id' ... http://www.jffnms.org/ turned up and is just what I was

RE: [PHP] foreach

2012-10-16 Thread Steven Staples
Here's what I ended up with after you gave me the advise: $result = mysql_query(SELECT * FROM items); $rows = array(); while($row = mysql_fetch_array($result)) $rows[] = $row; foreach($rows as $row){ $product = $row['product']; $price = $row['price']; echo $product ;

RES: [PHP] foreach

2012-10-16 Thread Samuel Lopes Grigolato
There is some cases that more code (and more cycles) is a good thing. For example, a multi-layer architecture (like presentation, business and data access) is more cpu-intensive than a single page doing everything in an entangled procedural style, but is far more easy to evolve! As Steven said,

Re: [PHP] foreach

2012-10-16 Thread Matijn Woudt
On Tue, Oct 16, 2012 at 3:46 PM, Steven Staples sstap...@mnsi.net wrote: One thing I do, is my coding and bracing style is something that Tedd Sperling doesn't like (there have been many discussions about bracing styles), I keep my braces all in line, and always use them in my if()s... ie:

RE: [PHP] foreach

2012-10-16 Thread Steven Staples
-Original Message- From: Matijn Woudt [mailto:tijn...@gmail.com] Steve, Please watch your language on this list. - Matijn My apologies, I guess using $foo == $bar would have been a better choice... I forget sometimes, I am used to chatting with my close friends, where stuff

RE: [PHP] foreach

2012-10-16 Thread Ashley Sheridan
On Tue, 2012-10-16 at 10:11 -0400, Steven Staples wrote: -Original Message- From: Matijn Woudt [mailto:tijn...@gmail.com] Steve, Please watch your language on this list. - Matijn My apologies, I guess using $foo == $bar would have been a better choice... I forget

Re: [PHP] foreach

2012-10-16 Thread Jim Giner
On 10/15/2012 8:39 PM, Jim Lucas wrote: On 10/15/2012 05:16 PM, David McGlone wrote: I've been sitting here playing around with foreach() and I'm wondering why I am getting these results. here's what I've been fooling around with. the code has no perticular meaning, but I noticed if the script

Re: [PHP] Serving an image

2012-10-16 Thread Alan Hoffmeister
2012/10/15 viper recursivepoin...@gmail.com: On Mon, Oct 15, 2012 at 5:48 PM, Rick Dwyer rpdw...@earthlink.net wrote: I am sending an email with a logo at the top of the email. The source of the image for the logo is: http://myurl.com/image.php?id=5 Image.php then calls a function that

[PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Richard S. Crawford
The value of date.timezone in php.ini is set to America/Los_Angeles. The local time is 11:02 a.m. Yet the output of date(h:i a e) is: 02:02 pm America/Los_Angeles which is three hours ahead of the real time. Why is this? What's going on? -- Sláinte, Richard S. Crawford

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Daniel P. Brown
On Tue, Oct 16, 2012 at 2:02 PM, Richard S. Crawford rich...@underpope.com wrote: The value of date.timezone in php.ini is set to America/Los_Angeles. The local time is 11:02 a.m. Yet the output of date(h:i a e) is: 02:02 pm America/Los_Angeles which is three hours ahead of the real time.

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread David OBrien
On Tue, Oct 16, 2012 at 2:02 PM, Richard S. Crawford rich...@underpope.comwrote: The value of date.timezone in php.ini is set to America/Los_Angeles. The local time is 11:02 a.m. Yet the output of date(h:i a e) is: 02:02 pm America/Los_Angeles which is three hours ahead of the real time.

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Adam Richardson
On Tue, Oct 16, 2012 at 2:02 PM, Richard S. Crawford rich...@underpope.com wrote: The value of date.timezone in php.ini is set to America/Los_Angeles. The local time is 11:02 a.m. Yet the output of date(h:i a e) is: 02:02 pm America/Los_Angeles which is three hours ahead of the real time.

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Richard S. Crawford
I double checked the server time. It is set to America/Los_Angeles as well. On Tue, Oct 16, 2012 at 11:07 AM, Adam Richardson simples...@gmail.comwrote: On Tue, Oct 16, 2012 at 2:02 PM, Richard S. Crawford rich...@underpope.com wrote: The value of date.timezone in php.ini is set to

Re: [PHP] foreach

2012-10-16 Thread David McGlone
On Tuesday, October 16, 2012 09:46:26 AM you wrote: Here's what I ended up with after you gave me the advise: $result = mysql_query(SELECT * FROM items); $rows = array(); while($row = mysql_fetch_array($result)) $rows[] = $row; foreach($rows as $row){ $product

Re: RES: [PHP] foreach

2012-10-16 Thread David McGlone
On Tuesday, October 16, 2012 11:02:18 AM Samuel Lopes Grigolato wrote: There is some cases that more code (and more cycles) is a good thing. For example, a multi-layer architecture (like presentation, business and data access) is more cpu-intensive than a single page doing everything in an

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Enrico Lamperti
You could try using date_default_timezone_sethttp://php.net/manual/en/function.date-default-timezone-set.php() in your script, instead. And if you don't need to care about DST, you can define a specific GMT offset http://www.php.net/manual/en/timezones.others.php. Hope it helps :) On Tue, Oct

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Richard S. Crawford
On Tue, Oct 16, 2012 at 12:42 PM, Enrico Lamperti z...@irken.com.ar wrote: You could try using date_default_timezone_set http://php.net/manual/en/function.date-default-timezone-set.php() in your script, instead. And if you don't need to care about DST, you can define a specific GMT offset

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Daniel Brown
On Tue, Oct 16, 2012 at 4:19 PM, Richard S. Crawford rscrawf...@mossroot.com wrote: Thanks for the suggestion. Unfortunately the problem seems to be that PHP thinks the America/Los_Angeles timezone is the same as EDT. I'm not sure how to approach this issue. Per list rules, just a gentle

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Richard S. Crawford
On Tue, Oct 16, 2012 at 2:05 PM, Daniel Brown danbr...@php.net wrote: On Tue, Oct 16, 2012 at 4:19 PM, Richard S. Crawford rscrawf...@mossroot.com wrote: Thanks for the suggestion. Unfortunately the problem seems to be that PHP thinks the America/Los_Angeles timezone is the same as EDT.

Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Daniel Brown
On Oct 16, 2012 5:24 PM, Richard S. Crawford rscrawf...@mossroot.com wrote: Sorry about that. I was getting very frustrated with the issue, and I forgot. I'll be sure to keep it in mind. No worries. With regard to debugging your issue, it's extremely unlikely that it's PHP's fault,

Re: [PHP] foreach

2012-10-16 Thread Larry Garfield
On 10/15/12 9:05 PM, David McGlone wrote: On Monday, October 15, 2012 08:21:23 PM you wrote: Bastien Koert On 2012-10-15, at 8:16 PM, David McGlone da...@dmcentral.net wrote: I've been sitting here playing around with foreach() and I'm wondering why I am getting these results. here's what

Re: [PHP] foreach

2012-10-16 Thread tamouse mailing lists
On Tue, Oct 16, 2012 at 6:25 PM, Larry Garfield la...@garfieldtech.com wrote: Instead, use PDO, and bind your parameters. As a nice bonus, the result from a PDO-based query is not a raw resource but an iteratable object, which means you can foreach() it. http://php.net/manual/en/book.pdo.php