Re: [PHP] Please help with glob

2011-04-05 Thread Louis Huppenbauer
Hi there Since glob is actually a part of the core - Are you absolutely sure that you're running PHP 4.3 2011/4/5 Al Mangkok almang...@gmail.com: Hi everyone, I am very new to PHP and trying to learn the glob() function. I copied the example on php.net : ?php foreach (glob(*.txt) as

Re: [PHP] Please help with glob

2011-04-05 Thread Al Mangkok
Hi Louis, Yes, I have read that glob is only available for PHP 4.3 and I am using version 5.2.1.7 # /usr/local/bin/php -v PHP 5.2.17 (cli) (built: Feb 16 2011 15:41:35) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies with Zend Optimizer

Re: [PHP] Please help with glob

2011-04-05 Thread Al Mangkok
Yesterday I yum installed these: glibc-common.i386 2.3.4-2.54 glibc.i686 2.3.4-2.54 glibc-headers.i386 2.3.4-2.54 glibc-devel.i386 2.3.4-2.54 And about ten minutes ago I recompiled PHP with identical configure options as before. And this time the glob function is inside PHP. Phew. Hopefully

Re: [PHP] DateTime using DateTimeZone Timestamp problem

2011-04-05 Thread Simon J Welsh
On 5/04/2011, at 3:35 AM, Ian wrote: Hi, I have a problem using the php built in classes DateTime and DateTimeZone. The idea behind the following code is to return the timestamp for the current time in Singapore (or other places). What it actually returns is the timestamp for the local

Re: [PHP] DateTime using DateTimeZone Timestamp problem

2011-04-05 Thread Richard Quadling
On 4 April 2011 16:35, Ian php_l...@fishnet.co.uk wrote: Hi, I have a problem using the php built in classes DateTime and DateTimeZone. The idea behind the following code is to return the timestamp for the current time in Singapore (or other places).  What it actually returns is the

[PHP] Re: DateTime using DateTimeZone Timestamp problem

2011-04-05 Thread Ian
On 05/04/2011 10:11, Simon J Welsh wrote: On 5/04/2011, at 3:35 AM, Ian wrote: Hi, I have a problem using the php built in classes DateTime and DateTimeZone. The idea behind the following code is to return the timestamp for the current time in Singapore (or other places). What it

[PHP] randomly random

2011-04-05 Thread Kirk Bailey
OK gang, to spew a single line from a file of fortune cookies, I want to read it and echo one line. While I found a 4 line code which gets it done, I thought there was a preexisting command to do exactly that. Any feedback on this? -- end Very Truly yours, - Kirk Bailey,

Re: [PHP] randomly random

2011-04-05 Thread Richard Quadling
On 5 April 2011 15:07, Kirk Bailey kbai...@howlermonkey.net wrote: OK gang, to spew a single line from a file of fortune cookies, I want to read it and echo one line. While I found a 4 line code which gets it done, I thought there was a preexisting command to do exactly that. Any feedback on

Re: [PHP] randomly random

2011-04-05 Thread Jim Lucas
On 4/5/2011 7:07 AM, Kirk Bailey wrote: OK gang, to spew a single line from a file of fortune cookies, I want to read it and echo one line. While I found a 4 line code which gets it done, I thought there was a preexisting command to do exactly that. Any feedback on this? No, but it can be

Re: [PHP] randomly random

2011-04-05 Thread Stuart Dallas
On Tuesday, 5 April 2011 at 16:14, Jim Lucas wrote: On 4/5/2011 7:07 AM, Kirk Bailey wrote: OK gang, to spew a single line from a file of fortune cookies, I want to read it and echo one line. While I found a 4 line code which gets it done, I thought there was a preexisting command to do

[PHP] Re: Ranges for case statement and a WTF moment.

2011-04-05 Thread Richard Quadling
On 5 April 2011 16:28, Richard Quadling rquadl...@gmail.com wrote: Hi. I just wanted to quickly see if PHP supported ranges in its switch/case statement (http://en.wikipedia.org/wiki/Ellipsis) ?php $s = intval(date('s')); switch($s)        {        case 0...9   : echo 'Between 0 and 9';