Re: [PHP] Serving an image

2012-10-16 Thread ma...@behnke.biz
viper hat am 16. Oktober 2012 um 08:54 geschrieben: > On Tue, Oct 16, 2012 at 7:40 AM, Jan Ehrhardt 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.. > h

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 lo

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 "$pro

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, yo

Re: [PHP] foreach

2012-10-16 Thread Matijn Woudt
On Tue, Oct 16, 2012 at 3:46 PM, Steven Staples 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: > > And I do th

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 s

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 choic

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 f

Re: [PHP] Serving an image

2012-10-16 Thread Alan Hoffmeister
2012/10/15 viper : > On Mon, Oct 15, 2012 at 5:48 PM, Rick Dwyer 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 simply returns the following: >> >> >

[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 (rich...@underpope.

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 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. > > Why is t

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 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. > > Why is t

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 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. > > Why is t

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 wrote: > On Tue, Oct 16, 2012 at 2:02 PM, Richard S. Crawford > wrote: > > The value of date.timezone in php.ini is set to "America/Los_Angeles". > > > > The local tim

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

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_set() in your script, instead. And if you don't need to care about DST, you can define a specific GMT offset . Hope it helps :) On Tue, Oc

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 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 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 reminder: please don

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 wrote: > On Tue, Oct 16, 2012 at 4:19 PM, Richard S. Crawford > 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

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

2012-10-16 Thread Daniel Brown
On Oct 16, 2012 5:24 PM, "Richard S. Crawford" 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, since no one e

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 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 aroun

Re: [PHP] foreach

2012-10-16 Thread tamouse mailing lists
On Tue, Oct 16, 2012 at 6:25 PM, Larry Garfield 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 > > $conn = new P