php-general Digest 30 Sep 2008 08:53:50 -0000 Issue 5710

2008-09-30 Thread php-general-digest-help

php-general Digest 30 Sep 2008 08:53:50 - Issue 5710

Topics (messages 281136 through 281151):

Time Loop
281136 by: MDB
281137 by: Robert Cummings

Re: How to submit form via PHP
281138 by: Lupus Michaelis
281141 by: Ashley Sheridan
281142 by: Ashley Sheridan
281143 by: Lupus Michaelis
281144 by: Nisse Engström
281145 by: Shawn McKenzie
281146 by: Richard Lynch
281147 by: Waynn Lue

Re: Wanted PHP Developers LogicManse
281139 by: Bastien Koert

Re: [PHP-DB] Using oci_execute
281140 by: Chris

question about EOF
281148 by: LKSunny
281149 by: Jochem Maas
281150 by: Ross McKay

Name of graph
281151 by: Richard Heyes

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
Hello All, I am trying to figure out how to loop through 2 given times.  I 
have a start time and a end time and want to look through every X mins and 
add a radio button.  Below is my latest try, can someone please help me out?



 $endTime = 17:00:00;
 $currentTime=09:00:00;

 $num_intervals = floor(($endTime - $currentTime) / 30);

 echo (Num_INter: .$num_intervals./br);

 $buffer_time = $currentTime;
 for($i = 0; $i  $num_intervals; $i++)
 {
   echo (tr);
   echo (td.$currentTime./td);

   foreach ($days as $day)
   {
   echo (td);
   echo (input type='radio' name='dateTimeSelection' 
value=$day);


   echo (/td);
   }


   $buffer_time += $interval;
   echo (/tr);
 }



ps  I was having problems with my news reader, this may be posted twice, if 
so. Sorry.


TIA 

---End Message---
---BeginMessage---
On Mon, 2008-09-29 at 17:01 -0400, MDB wrote:
 Hello All, I am trying to figure out how to loop through 2 given times.  I 
 have a start time and a end time and want to look through every X mins and 
 add a radio button.  Below is my latest try, can someone please help me out?
 
 
   $endTime = 17:00:00;
   $currentTime=09:00:00;
 
   $num_intervals = floor(($endTime - $currentTime) / 30);

You should convert your times to minutes so you can use minute
intervals... the following was written directly into the email and so it
is UNTESTED:

?php

$bits = explode( ':', $currentTime );
$currentTime = $bits[0] * 60 + $bits[1];

$bits = explode( ':', $endTime );
$endTime = $bits[0] * 60 + $bits[1];

$interval = 15; // minutes
for( $i = $currentTime; $i = $endTime; $i += $interval )
{
$time = floor( $i / 60 ).':'.($i % 60).':00';
}

?

Adapt to fit your needs.

Note: I used a time interval like you state in your above description (X
mins). But the code you submitted used appeared to use number of time
slices instead.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP

---End Message---
---BeginMessage---

Micah Gersten a écrit :

Not according to this:
http://www.w3.org/TR/html401/interact/forms.html#adef-action

The only defined behaviour is when you specify a URI.


  The empty string into an HTML document is a valid relative URI ;) 
According the same document gave (just follow the references ;) ).


--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
---End Message---
---BeginMessage---
On Mon, 2008-09-29 at 23:56 +0200, Lupus Michaelis wrote:
 Micah Gersten a écrit :
  Not according to this:
  http://www.w3.org/TR/html401/interact/forms.html#adef-action
  
  The only defined behaviour is when you specify a URI.
 
The empty string into an HTML document is a valid relative URI ;) 
 According the same document gave (just follow the references ;) ).
 
 -- 
 Mickaël Wolff aka Lupus Michaelis
 http://lupusmic.org
 
Do you have a reference for that, because I don't see it...


Ash
www.ashleysheridan.co.uk

---End Message---
---BeginMessage---
On Mon, 2008-09-29 at 23:40 +0100, Ashley Sheridan wrote:
 On Mon, 2008-09-29 at 23:56 +0200, Lupus Michaelis wrote:
  Micah Gersten a écrit :
   Not according to this:
   http://www.w3.org/TR/html401/interact/forms.html#adef-action
   
   The only defined behaviour is when you specify a URI.
  
 The empty string into an HTML document is a valid relative URI ;) 
  According the same document gave (just follow the references ;) ).
  
  -- 
  Mickaël Wolff aka Lupus Michaelis
  http://lupusmic.org
  
 Do you have a reference for that, because I don't see it...
 
 
 Ash
 www.ashleysheridan.co.uk
 
 
Sorry, my bad, I see it!


Ash
www.ashleysheridan.co.uk

---End Message---
---BeginMessage---

Ashley Sheridan a écrit :

  From the link you gave, we stick on 
http://www.w3.org/TR/html401/types.html#type-uri, so it references an 
IETF RFC 

Re: [PHP] question about EOF

2008-09-30 Thread Jochem Maas
LKSunny schreef:
 Hello,
 
 i want on inner EOF do something, calculate and call function ? can not ? if 
 yes, how to ?

no you can't, store the results of calculation and function calls in
variables and use them in the HEREDOC statement.

a HEREDOC declaration is just a string declaration like these:

$s = 'foo';
$t = bar;

they can't contain expressions, function calls or anything like that.

 
 ?
 echo EOF
 some text
 can i calculate on inner EOF ? 10*100 display 1000 ?
 can i add function on inner EOF ? date('Y') display 2008 ?
 any more text.
 EOF;
 //i want output is
 /*
 some text
 can i calculate on inner EOF ? 1000 display 1000 ?
 can i add function on inner EOF ? 2008 display 2008 ?
 any more text.
 */
 ?
 
 Thank You. 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: question about EOF

2008-09-30 Thread Ross McKay
On Tue, 30 Sep 2008 12:48:35 +0800, LKSunny wrote:

i want on inner EOF do something, calculate and call function ? can not ? if 
yes, how to ?

Same way as you do with  strings. e.g.

?php
class foo {
  function bar() {
return 'world!';
  }

  function hello() {
echo ENDHELLO
Hello, {$this-bar()}
ENDHELLO;
  }
}

$foo = new foo();
$foo-hello();
?
-- 
Ross McKay, Toronto, NSW Australia
Let the laddie play wi the knife - he'll learn
- The Wee Book of Calvin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Name of graph

2008-09-30 Thread Richard Heyes
Hi,

Anyone know what the line in the first bar chart is called? I call it
a summary line, but that's wrong. ISTR it being referred to
something that involved the word frequency, but I may be off my
trolley...

You'll need a browser other then MSIE to see them. Thanks.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] error warning while connecting to posgreSQL

2008-09-30 Thread Adrian Videnie

Nilesh Govindrajan wrote:
Yeah that's true. Placing an @ before the function is a bad idea. Instead use 
error_reporting(E_NONE) OR error_reporting(0)
  


You should never use error_reporting(E_NONE), not even in production 
mode. The correct options are:


error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', false);
ini_set('log_errors', true);
ini_set('error_log', '/path/to/error.log');

While development, set display_errors to true and all errors should be 
output to screen. When moved to production, set display_errors to false, 
but continue to log any error/warning/notice into the error.log. You 
shouldn't get anything in there anyway, if your application is bug free 
(hehe, we wish). This way, you have a little bit of flexibility in 
debugging a problem that might appear.


Adrian

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Per Jessen
Richard Heyes wrote:

 Hi,
 
 Anyone know what the line in the first bar chart is called? I call it
 a summary line, but that's wrong. ISTR it being referred to
 something that involved the word frequency, but I may be off my
 trolley...

How about just 'axis' ?

 
 You'll need a browser other then MSIE to see them. Thanks.

here: http://www.phpguru.org/downloads/RGraph/examples/bar.html ?



/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Name of graph

2008-09-30 Thread Nathan Rixham

Richard Heyes wrote:

Hi,

Anyone know what the line in the first bar chart is called? I call it
a summary line, but that's wrong. ISTR it being referred to
something that involved the word frequency, but I may be off my
trolley...

You'll need a browser other then MSIE to see them. Thanks.



series average line - I thinks..

regards,

nathan

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Richard Heyes
 If anything it's a regression line.  It represents a trend as a linear
 function which has been computed using linear regression.

Thanks!

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread Stut

On 29 Sep 2008, at 12:47, Nathan Rixham wrote:
Last week I got to thinking about PHP vs other languages.. sparing  
the details this is what I decided I'd like my code to look like :)  
[what *I* /as an OO developer/ need(?want)]


?php

package com.mydom.thispackage


Looks a lot like Java, not that that's a bad thing.


{


Completely agree that multiple namespaces per file should be allowed,  
and using curly brackets is the obvious syntax.



 import com.anotherdom.MysqlDbHandler as DbHandlerA;
 import com.somedom.DbHandler as DbHandlerB; # as makes this easier
 import com.mydom.thatpackage.RssParser; # we don't have to as


Would this then be available as RssParser:: or would you need to  
specify the full name.



 import net.php.pecl.Tidy into TidySpace; # into namespace
 import org.nicedom.alwaysusethese.*; # why not?


How does PHP work out where these packages are?


 public class MyClass # visibility on classes
 {
   private $dba:DbHandlerA = new DbHandlerA();
   private $dbb:DbHandlerB = new DbHandlerB();


Can't do this. This would require the compilation phase to execute  
code. This is what constructors were made for.


Personally I'd prefer the fairly standard type varname order rather  
than the varname:type you have here.



   protected $xmlString:String;

   public function __construct( String $xml ):void #return types


Here you've switched to the type varname order for the parameters  
and gone back to :type for the return value. Why not just function  
x(type varname) type ?



   {
 if( TidySpace::tidy_is_xml( $xml ) ) { #namespace function call
   $this-xmlString = TidySpace::tidy_repair_string( $xml );


One would hope that when namespaces are ubiquitous there will be no  
need to prefix functions with package identifiers.



 }
   }

 }

}
?

all purely a made up example; I'd be interested to here any comments  
or what your ideal language (/modified php) would look like.


I've never really thought about how I'd like a languages syntax to be,  
I've just accepted the way it is. Having said that I've built a couple  
of compilers in my time and for the most part they were a combination  
of C, C++ and Perl, much like PHP. So in that respect PHP is the one  
that clearly makes the most sense to me for procedural languages.


In terms of OO I've always liked the Objective-C way of doing things.  
It seems more natural than the C++ syntax.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Per Jessen
Richard Heyes wrote:

 If anything it's a regression line.  It represents a trend as a
 linear function which has been computed using linear regression.
 
 Thanks!
 

I need to add - your line in the first barchart isn't actually a trend
nor is it very linear :-)  That line is just a different representation
(line graph) of the same numbers.

A trend line computed by linear regression would be like this: 

http://jessen.ch/images/virus+malware-q3-2008.jpeg


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread Nathan Rixham

Stut wrote:

On 29 Sep 2008, at 12:47, Nathan Rixham wrote:
Last week I got to thinking about PHP vs other languages.. sparing the 
details this is what I decided I'd like my code to look like :) [what 
*I* /as an OO developer/ need(?want)]


?php

package com.mydom.thispackage


Looks a lot like Java, not that that's a bad thing.


{


Completely agree that multiple namespaces per file should be allowed, 
and using curly brackets is the obvious syntax.



 import com.anotherdom.MysqlDbHandler as DbHandlerA;
 import com.somedom.DbHandler as DbHandlerB; # as makes this easier
 import com.mydom.thatpackage.RssParser; # we don't have to as


Would this then be available as RssParser:: or would you need to specify 
the full name.

just RssParser.. I'd see import being a replacement for include
import com.mydom.thatpackage.RssParser;
same as
import '/classpath/com/mydom/thatpackage/RssParser.php';




 import net.php.pecl.Tidy into TidySpace; # into namespace
 import org.nicedom.alwaysusethese.*; # why not?


How does PHP work out where these packages are?

see above + in this case compiler would loop through the directory
'org/nicedom/alway/usethese/' and include all files (one class per file)



 public class MyClass # visibility on classes
 {
   private $dba:DbHandlerA = new DbHandlerA();
   private $dbb:DbHandlerB = new DbHandlerB();


Can't do this. This would require the compilation phase to execute code. 
This is what constructors were made for.

my mistake I meant:
private DbHandlerA $dba = new DbHandlerA();
private DbHandlerB $dbb = new DbHandlerB();
scope type variablename = new class();

obviously calling __construct as per normal.



Personally I'd prefer the fairly standard type varname order rather 
than the varname:type you have here.

agreed - thought that as an after thought; no need to change everything!




   protected $xmlString:String;

   public function __construct( String $xml ):void #return types


Here you've switched to the type varname order for the parameters and 
gone back to :type for the return value. Why not just function x(type 
varname) type ?


see above.. type $variable is better [well matter of preference, no 
need to change] :)





   {
 if( TidySpace::tidy_is_xml( $xml ) ) { #namespace function call
   $this-xmlString = TidySpace::tidy_repair_string( $xml );


One would hope that when namespaces are ubiquitous there will be no need 
to prefix functions with package identifiers.


surely that would defeat the point of namespaces.. if the function 
exists in two or more namespaces/packages then namespace prefix is required.

with NAMESPACE {

}
syntax would be cool as well




 }
   }

 }

}
?

all purely a made up example; I'd be interested to here any comments 
or what your ideal language (/modified php) would look like.


I've never really thought about how I'd like a languages syntax to be, 
I've just accepted the way it is. Having said that I've built a couple 
of compilers in my time and for the most part they were a combination of 
C, C++ and Perl, much like PHP. So in that respect PHP is the one that 
clearly makes the most sense to me for procedural languages.


In terms of OO I've always liked the Objective-C way of doing things. It 
seems more natural than the C++ syntax.


-Stut



why not throw out your ideal/made up procedural php language syntax; 
would be interested to see how what I as an OO dev would prefer compares 
to what you as a procedural dev would prefer.


thanks for the reply - probably a wasted convo but an interesting one 
that may lead somewhere!


--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jay Moore

looks like spam/scam to me


Thanks for quoting the whole message then!  :P

Jay


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Richard Heyes
 I need to add - your line in the first barchart isn't actually a trend
 nor is it very linear :-)  That line is just a different representation
 (line graph) of the same numbers.

Yes, all it does it connect the tops of the bars. Much like a line
graph would be with the same values.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Richard Heyes
 Thanks for quoting the whole message then!  :P

Maybe he just wanted to make sure you got it...

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Zend_Form: How to change positions of elements ?

2008-09-30 Thread Nilesh Govindrajan
Hi,

I am new to Zend Framework.

I would like to know how to change the positions of elements created using 
Zend_Form. 

I mean that how do I place two elements one near other instead of in a 
top-down manner ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Nathan Rixham

Richard Heyes wrote:

Thanks for quoting the whole message then!  :P


Maybe he just wanted to make sure you got it...



I'm always really tight on these guy's - but it is just somebody 
offering us a job I guess; they could have scoured the boards; ripped 
every email address and spammed the hell out of us if they'd wanted.


*what's wrong with me today*

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [fw-general] Re: Zend_Form: How to change positions of elements ?

2008-09-30 Thread Nilesh Govindrajan
On Tuesday 30 September 2008 07:13:11 pm Colin Guthrie wrote:
 Nilesh Govindrajan wrote:
  I am new to Zend Framework.
 
  I would like to know how to change the positions of elements created
  using Zend_Form.
 
  I mean that how do I place two elements one near other instead of in a
  top-down manner ?

 Just so you know it's generally considered bad netiquette to cross post
 unnecessarily.

 As this is a Zend specific query, the Zend Framework mailing list would
 have been the first port of call here.

 I've not gotten round to learning Zend_Form yet, so can't help you yet!

 Col

Both of the lists are related to PHP. So if somebody who's not on Zend List 
but is on PHP List, he can help me out. 




signature.asc
Description: This is a digitally signed message part.


[PHP] db_* = pg_*/my_*/ifx_* ?

2008-09-30 Thread Michelle Konzack
Hello,

I am using some crapy software,  which  does  not  allow  switching  the
Database, where I use PostgreSQL since 1999  and  those  crapy  software
force me to install mysql, sqlite and  other  databases  which  let  the
administration, maintenance AND COSTS explode...

My own tools are generaly build for PostgreSQL but very adaptive,  since
I use and include (e.g.:  db_pgsql.inc) with the neccesary  functions.

This mean, I can create a db_mysql.inc and change the include  path  and
all is working as expected.

Now my question is:

Is there a tool which support such thing already or
do I have to do this crap for each software I code?

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
+49/177/935194750, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


RE: [PHP] How to submit form via PHP

2008-09-30 Thread Richard Lynch
Yes, any GET parameters you had will not be added in.

I believe a fragment (#anchor) will be included however.

Read the specs for base to see for sure.

It's all spelled out, if you can follow the paper trail and have enough time to 
read it :-)

 -Original Message-
 From: Waynn Lue [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 29, 2008 7:34 PM
 To: Lupus Michaelis; php-general@lists.php.net
 Subject: Re: [PHP] How to submit form via PHP

 Hm, it specifies base though. Does that mean the full query string
 won't be guaranteed to be passed along?



 On 9/29/08, Lupus Michaelis [EMAIL PROTECTED] wrote:
  Ashley Sheridan a écrit :
 
 From the link you gave, we stick on
  http://www.w3.org/TR/html401/types.html#type-uri, so it references
 an
  IETF RFC http://www.ietf.org/rfc/rfc1808.txt that describes what is
 an
  URI.
 
 The fourth section describes how we have to determine the
 resolution
  of an URI. The point that are in our scope is the next I quote :
 
  «
  a) If the embedded URL is entirely empty, it inherits the
 entire base URL (i.e., is set equal to the base URL)
 and we are done.
  »
 
 If you have any doubt, just enjoy reading the full document ;)
 
 But for me, it is quite clear that an empty string is a valid URI
  *into* a document served by HTTP.
 
  --
  Mickaël Wolff aka Lupus Michaelis
  http://lupusmic.org
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: db_* = pg_*/my_*/ifx_* ?

2008-09-30 Thread Nathan Rixham

Michelle Konzack wrote:

Hello,

I am using some crapy software,  which  does  not  allow  switching  the
Database, where I use PostgreSQL since 1999  and  those  crapy  software
force me to install mysql, sqlite and  other  databases  which  let  the
administration, maintenance AND COSTS explode...

My own tools are generaly build for PostgreSQL but very adaptive,  since
I use and include (e.g.:  db_pgsql.inc) with the neccesary  functions.

This mean, I can create a db_mysql.inc and change the include  path  and
all is working as expected.

Now my question is:

Is there a tool which support such thing already or
do I have to do this crap for each software I code?

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant




pure genius - try google - phpclasses or rtfm :)

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [fw-general] Re: Zend_Form: How to change positions of elements ?

2008-09-30 Thread Bastien Koert
On Tue, Sep 30, 2008 at 9:47 AM, Nilesh Govindrajan [EMAIL PROTECTED]wrote:

 On Tuesday 30 September 2008 07:13:11 pm Colin Guthrie wrote:


Find the view handler and change the html to place them how you want to
place them

-- 

Bastien

Cat, the other other white meat


Re: [PHP] Name of graph

2008-09-30 Thread tedd

At 9:53 AM +0100 9/30/08, Richard Heyes wrote:

Hi,

Anyone know what the line in the first bar chart is called? I call it
a summary line,


I've always called it Timmy -- but you may call it whatever you want.

The summary line, as shown on your chart, is simply a line graph, 
there is no specific name for it that I am aware -- unless you want 
to make one up -- after all, it's your chart.


You may call it whatever you want, provided the term is not used for 
something else. For example, it is not a trend line, nor an axis, nor 
a regression, nor series average line -- it's simply a line graph.


BTW -- What is it with you and graphs? Are you creating a library for charting?

Cheers,

tedd

PS: Per Jesse was correct about the trend line.

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jochem Maas
Nathan Rixham schreef:
 Richard Heyes wrote:
 Thanks for quoting the whole message then!  :P

 Maybe he just wanted to make sure you got it...

 
 I'm always really tight on these guy's - but it is just somebody
 offering us a job I guess; they could have scoured the boards; ripped
 every email address and spammed the hell out of us if they'd wanted.
 
 *what's wrong with me today*

dunno ... but stop giving them ideas ;-)

 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] question about EOF

2008-09-30 Thread tedd

At 12:48 PM +0800 9/30/08, LKSunny wrote:

Hello,

i want on inner EOF do something, calculate and call function ? can not ? if
yes, how to ?

?
echo EOF
some text
can i calculate on inner EOF ? 10*100 display 1000 ?
can i add function on inner EOF ? date('Y') display 2008 ?
any more text.
EOF;
//i want output is
/*
some text
can i calculate on inner EOF ? 1000 display 1000 ?
can i add function on inner EOF ? 2008 display 2008 ?
any more text.
*/
?



Like I tell my dogs Don't do it inside.

Place your decision making outside of the herdoc and then branch to 
whatever heredoc you want.


My advice,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread Stut

On 30 Sep 2008, at 14:00, Nathan Rixham wrote:

Stut wrote:

On 29 Sep 2008, at 12:47, Nathan Rixham wrote:

import com.anotherdom.MysqlDbHandler as DbHandlerA;
import com.somedom.DbHandler as DbHandlerB; # as makes this easier
import com.mydom.thatpackage.RssParser; # we don't have to as
Would this then be available as RssParser:: or would you need to  
specify the full name.

just RssParser.. I'd see import being a replacement for include
import com.mydom.thatpackage.RssParser;
same as
import '/classpath/com/mydom/thatpackage/RssParser.php';


Where did /classpath come from? Seems to me that's no better than  
simply using include. I see no value in replacing / with . in the path.



import net.php.pecl.Tidy into TidySpace; # into namespace
import org.nicedom.alwaysusethese.*; # why not?

How does PHP work out where these packages are?

see above + in this case compiler would loop through the directory
'org/nicedom/alway/usethese/' and include all files (one class per  
file)


The ability to have multiple namespaces per file leads to issues with  
the as or into syntax. Which namespace from that file are you  
aliasing? This ambiguity is a killer.



public class MyClass # visibility on classes
{
  private $dba:DbHandlerA = new DbHandlerA();
  private $dbb:DbHandlerB = new DbHandlerB();
Can't do this. This would require the compilation phase to execute  
code. This is what constructors were made for.

my mistake I meant:
private DbHandlerA $dba = new DbHandlerA();
private DbHandlerB $dbb = new DbHandlerB();
scope type variablename = new class();

obviously calling __construct as per normal.


Except you can't, like I said. Try it. You cannot execute code during  
variable declaration in classes, you can only initialise to literal  
values.



  {
if( TidySpace::tidy_is_xml( $xml ) ) { #namespace function call
  $this-xmlString = TidySpace::tidy_repair_string( $xml );
One would hope that when namespaces are ubiquitous there will be no  
need to prefix functions with package identifiers.


surely that would defeat the point of namespaces.. if the function  
exists in two or more namespaces/packages then namespace prefix is  
required.


I'm not referring to the namespace prefix, I'm referring to the tidy_  
prefix.



with NAMESPACE {

}
syntax would be cool as well


Agreed.

all purely a made up example; I'd be interested to here any  
comments or what your ideal language (/modified php) would look  
like.
I've never really thought about how I'd like a languages syntax to  
be, I've just accepted the way it is. Having said that I've built a  
couple of compilers in my time and for the most part they were a  
combination of C, C++ and Perl, much like PHP. So in that respect  
PHP is the one that clearly makes the most sense to me for  
procedural languages.
In terms of OO I've always liked the Objective-C way of doing  
things. It seems more natural than the C++ syntax.

-Stut


why not throw out your ideal/made up procedural php language syntax;  
would be interested to see how what I as an OO dev would prefer  
compares to what you as a procedural dev would prefer.


Unfortunately they've all been proprietary, but the basic syntax for  
all of them was similar to PHP and they didn't have complex concepts  
like packages or classes and only one of them had functions.


thanks for the reply - probably a wasted convo but an interesting  
one that may lead somewhere!


Namespace syntax discussions are ongoing on the internals list.  
Nothing has been officially released yet so nothing has been  
finalised. There was a cracking suggestion a week or so ago that the $  
prefix for variables should be removed. Can you imagine the community  
backlash at such a pointless change!!


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jim Lucas
Nathan Rixham wrote:
 Richard Heyes wrote:
 Thanks for quoting the whole message then!  :P

 Maybe he just wanted to make sure you got it...

 
 I'm always really tight on these guy's - but it is just somebody
 offering us a job I guess; they could have scoured the boards; ripped
 every email address and spammed the hell out of us if they'd wanted.

Why do you think they are looking for a programmer...

 
 *what's wrong with me today*
 


-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] navigation / location bar

2008-09-30 Thread Alain Roger
Hi,

a lot of web sites propose a locationbar (something like dynamic map site)
to end user when they are browsing the website.
usually i looks like that:

Home  Products  Software  Operating System  Windows XP

User can come back to a previous parent node by just clicking on the name,
for example : Software.

so:
1. what is the best method to use to create such location bar ? (array
stored in session variable ?)
2. how to populate this bar ? (each time that user visit a page, the array
is updated. if yes, how ?)

-- 
Alain

Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


RE: [PHP] navigation / location bar

2008-09-30 Thread Jay Blanchard
[snip]
a lot of web sites propose a locationbar (something like dynamic map
site)
to end user when they are browsing the website.
usually i looks like that:

Home  Products  Software  Operating System  Windows XP

User can come back to a previous parent node by just clicking on the
name,
for example : Software.

so:
1. what is the best method to use to create such location bar ? (array
stored in session variable ?)
2. how to populate this bar ? (each time that user visit a page, the
array
is updated. if yes, how ?)
[/snip]

Google bread (or cookie) crumb navigation

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread Stut

On 30 Sep 2008, at 16:04, Alain Roger wrote:
a lot of web sites propose a locationbar (something like dynamic map  
site)

to end user when they are browsing the website.
usually i looks like that:

Home  Products  Software  Operating System  Windows XP

User can come back to a previous parent node by just clicking on the  
name,

for example : Software.

so:
1. what is the best method to use to create such location bar ?  
(array

stored in session variable ?)
2. how to populate this bar ? (each time that user visit a page, the  
array

is updated. if yes, how ?)


These are usually called breadcrumbs and come in two forms. One is  
true to the name and the other is actually the page location on the  
site rather than crumbs.


True breadcrumbs store the URL and name of the last n pages the user  
visited and displays them as links to allow the user to go back  
through their browser history. Since this duplicates functionality  
that exists in 99.9% of browsers out there this type is pretty  
rare these days. These are pretty simple to implement but you need  
some way to store an RRD array between requests.


The more common type of breadcrumb is simply the location within the  
site. Your example above is of this type. Occasionally you'll find  
these are customised slightly based on user activity but for the most  
part they're simply an indication of where in the site structure the  
page is.


Given that they're linked more to the page than the user there's no  
need to track anything between pages unless you want to customise them  
for the user. All your site need to be able to do is create the  
heirarchy up to the homepage from any page.


As examples check out the following pages (under the orange bar)...

http://uk.freeads.net/
http://pets.uk.freeads.net/
http://pets.uk.freeads.net/cats/
http://pets.uk.freeads.net/cats/search?for=kitten

And regional versions...

http://aberdeen.uk.freeads.net/
http://aberdeen.uk.freeads.net/pets/
http://aberdeen.uk.freeads.net/pets/cats/
http://aberdeen.uk.freeads.net/pets/cats/search?for=kitten

If your site can't figure out where it is in the heirarchy then you've  
got other problems more important than not being able to give the user  
breadcrumbs.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Richard Heyes
 BTW -- What is it with you and graphs? Are you creating a library for
 charting?

Created:

http://www.phpguru.org/RGraph

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Nathan Rixham

Jim Lucas wrote:

Nathan Rixham wrote:

Richard Heyes wrote:

Thanks for quoting the whole message then!  :P

Maybe he just wanted to make sure you got it...


I'm always really tight on these guy's - but it is just somebody
offering us a job I guess; they could have scoured the boards; ripped
every email address and spammed the hell out of us if they'd wanted.


Why do you think they are looking for a programmer...



seriously? subject being Wanted PHP Developers..

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread Alain Roger
Interesting but how to make this hierarchy ?
this i do not know in PHP :-(
where can i find code examples ?

On Tue, Sep 30, 2008 at 5:27 PM, Stut [EMAIL PROTECTED] wrote:

 On 30 Sep 2008, at 16:04, Alain Roger wrote:

 a lot of web sites propose a locationbar (something like dynamic map site)
 to end user when they are browsing the website.
 usually i looks like that:

 Home  Products  Software  Operating System  Windows XP

 User can come back to a previous parent node by just clicking on the name,
 for example : Software.

 so:
 1. what is the best method to use to create such location bar ? (array
 stored in session variable ?)
 2. how to populate this bar ? (each time that user visit a page, the array
 is updated. if yes, how ?)


 These are usually called breadcrumbs and come in two forms. One is true to
 the name and the other is actually the page location on the site rather than
 crumbs.

 True breadcrumbs store the URL and name of the last n pages the user
 visited and displays them as links to allow the user to go back through
 their browser history. Since this duplicates functionality that exists in
 99.9% of browsers out there this type is pretty rare these days. These
 are pretty simple to implement but you need some way to store an RRD array
 between requests.

 The more common type of breadcrumb is simply the location within the site.
 Your example above is of this type. Occasionally you'll find these are
 customised slightly based on user activity but for the most part they're
 simply an indication of where in the site structure the page is.

 Given that they're linked more to the page than the user there's no need to
 track anything between pages unless you want to customise them for the user.
 All your site need to be able to do is create the heirarchy up to the
 homepage from any page.

 As examples check out the following pages (under the orange bar)...

 http://uk.freeads.net/
 http://pets.uk.freeads.net/
 http://pets.uk.freeads.net/cats/
 http://pets.uk.freeads.net/cats/search?for=kitten

 And regional versions...

 http://aberdeen.uk.freeads.net/
 http://aberdeen.uk.freeads.net/pets/
 http://aberdeen.uk.freeads.net/pets/cats/
 http://aberdeen.uk.freeads.net/pets/cats/search?for=kitten

 If your site can't figure out where it is in the heirarchy then you've got
 other problems more important than not being able to give the user
 breadcrumbs.

 -Stut

 --
 http://stut.net/




-- 
Alain

Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Daniel Brown
On Tue, Sep 30, 2008 at 11:31 AM, Nathan Rixham [EMAIL PROTECTED] wrote:

 seriously? subject being Wanted PHP Developers..

I'd like to know where you get the audacity to think it could
possibly refer to you.  We never *wanted* you here on the list, we
just got *stuck* with you.  ;-P

[Disclaimer to future generations: Note the emoticon.  We like Nate.]

[Disclaimer to Nate: Not that much.  ;-P]

-- 
/Daniel P. Brown
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread Stut

On 30 Sep 2008, at 16:33, Alain Roger wrote:

Interesting but how to make this hierarchy ?
this i do not know in PHP :-(
where can i find code examples ?


This depends too much on how your site is structured for me to give a  
useful answer.


As I said in my reply If your site can't figure out where it is in  
the heirarchy then you've got other problems more important than not  
being able to give the user breadcrumbs.


If you actually mean how do you build the HTML I suggest you find a  
begineers guide to PHP and work through that before tackling  
breadcrumbs.


It's annoying.
Why?
Oh, and please quit top-posting!

-Stut

--
http://stut.net/


On Tue, Sep 30, 2008 at 5:27 PM, Stut [EMAIL PROTECTED] wrote:
On 30 Sep 2008, at 16:04, Alain Roger wrote:
a lot of web sites propose a locationbar (something like dynamic map  
site)

to end user when they are browsing the website.
usually i looks like that:

Home  Products  Software  Operating System  Windows XP

User can come back to a previous parent node by just clicking on the  
name,

for example : Software.

so:
1. what is the best method to use to create such location bar ?  
(array

stored in session variable ?)
2. how to populate this bar ? (each time that user visit a page, the  
array

is updated. if yes, how ?)

These are usually called breadcrumbs and come in two forms. One is  
true to the name and the other is actually the page location on the  
site rather than crumbs.


True breadcrumbs store the URL and name of the last n pages the user  
visited and displays them as links to allow the user to go back  
through their browser history. Since this duplicates functionality  
that exists in 99.9% of browsers out there this type is pretty  
rare these days. These are pretty simple to implement but you need  
some way to store an RRD array between requests.


The more common type of breadcrumb is simply the location within the  
site. Your example above is of this type. Occasionally you'll find  
these are customised slightly based on user activity but for the  
most part they're simply an indication of where in the site  
structure the page is.


Given that they're linked more to the page than the user there's no  
need to track anything between pages unless you want to customise  
them for the user. All your site need to be able to do is create the  
heirarchy up to the homepage from any page.


As examples check out the following pages (under the orange bar)...

http://uk.freeads.net/
http://pets.uk.freeads.net/
http://pets.uk.freeads.net/cats/
http://pets.uk.freeads.net/cats/search?for=kitten

And regional versions...

http://aberdeen.uk.freeads.net/
http://aberdeen.uk.freeads.net/pets/
http://aberdeen.uk.freeads.net/pets/cats/
http://aberdeen.uk.freeads.net/pets/cats/search?for=kitten

If your site can't figure out where it is in the heirarchy then  
you've got other problems more important than not being able to give  
the user breadcrumbs.


-Stut

--
http://stut.net/



--
Alain

Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Time Loop

2008-09-30 Thread Jim Lucas
MDB wrote:
 Hello All, I am trying to figure out how to loop through 2 given times. 
 I have a start time and a end time and want to look through every X mins
 and add a radio button.  Below is my latest try, can someone please help
 me out?
 
 
  $endTime = 17:00:00;
  $currentTime=09:00:00;
 
  $num_intervals = floor(($endTime - $currentTime) / 30);
 
  echo (Num_INter: .$num_intervals./br);
 
  $buffer_time = $currentTime;
  for($i = 0; $i  $num_intervals; $i++)
  {
echo (tr);
echo (td.$currentTime./td);
 
foreach ($days as $day)
{
echo (td);
echo (input type='radio' name='dateTimeSelection'
 value=$day);
 
echo (/td);
}
 
 
$buffer_time += $interval;
echo (/tr);
  }
 
 
 
 ps  I was having problems with my news reader, this may be posted twice,
 if so. Sorry.
 
 TIA
 

Here is what I think you are looking for.

?php

# I am guessing that your $days array looks something like this.
$days = array('Sunday',
  'Monday',
  'Tuesday',
  'Wednesday',
  'Thursday',
  'Friday',
  'Saturday');

# Get todays information
$d = getdate();

$endTime = 17:00:00;
list($et_hr, $et_min, $et_sec) = explode(':', $endTime);
$unix_endTime = mktime($et_hr, $et_min, $et_sec,
   $d['mon'], $d['mday'], $d['year']);

$currentTime=09:00:00;
list($ct_hr, $ct_min, $ct_sec) = explode(':', $currentTime);
$unix_currentTime = mktime($ct_hr, $ct_min, $ct_sec,
   $d['mon'], $d['mday'], $d['year']);

$interval = 60;

# Calculate how many rows their should be
$num_intervals = floor(($unix_endTime - $unix_currentTime) / $interval);

echo 'Num_INter: ', $num_intervals, '/br';

echo 'formtable';

for ( $i=$unix_currentTime; $i = $unix_endTime; $i=($i+$interval) ) {
  echo 'tr', 'td', date('Y/m/d H:i:s', $i), '/td';

  foreach ($days AS $day) {
echo 'td',
 'input type=radio name=dateTimeSelection value=',
 $day,
 ' /',
 $day,
 '/td';
  }
  # Don't forget to reset the $days array
  # otherwise the array pointer is at the last index
  reset($days);
  echo '/tr';
}

echo '/table/form';

?

-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jim Lucas
Nathan Rixham wrote:
 Jim Lucas wrote:
 Nathan Rixham wrote:
 Richard Heyes wrote:
 Thanks for quoting the whole message then!  :P
 Maybe he just wanted to make sure you got it...

 I'm always really tight on these guy's - but it is just somebody
 offering us a job I guess; they could have scoured the boards; ripped
 every email address and spammed the hell out of us if they'd wanted.

 Why do you think they are looking for a programmer...

 
 seriously? subject being Wanted PHP Developers..
 

Come on, read the last line before my previous reply.   Here, let me get you
an excerpt:

they could have scoured the boards; ripped every email address and
spammed the hell out of us if they'd wanted.

Now, I'll put it together for you...

They want a programmer to be able to write a program to rip all the
email address from the various websites that have all our email address

I hate it when I have to explain the jokes...
-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread Nathan Rixham

Stut wrote:

On 30 Sep 2008, at 14:00, Nathan Rixham wrote:

Stut wrote:

On 29 Sep 2008, at 12:47, Nathan Rixham wrote:

import com.anotherdom.MysqlDbHandler as DbHandlerA;
import com.somedom.DbHandler as DbHandlerB; # as makes this easier
import com.mydom.thatpackage.RssParser; # we don't have to as
Would this then be available as RssParser:: or would you need to 
specify the full name.

just RssParser.. I'd see import being a replacement for include
import com.mydom.thatpackage.RssParser;
same as
import '/classpath/com/mydom/thatpackage/RssParser.php';


Where did /classpath come from? Seems to me that's no better than 
simply using include. I see no value in replacing / with . in the path.
/classpath was purely an illustration; the idea (or my thought behind) 
replacing / with . and using packages as such; would be do give all of 
us developers a set standard for file hierarchy / storing classes - 
think java classes/packages actionscript 3 classes; never any cross 
over; doesn't matter if 3 different companies all have a /db/handler.php 
as it's always saved in net/companydomain/packagename/db/handler.php - 
again back to the classpath; illustrating a set class root directory 
for all classes.


/classes/
/modules/
/templates/
etc; but only defining /classes at this time

to me anyways; this form of working in java and actionscript 3 (and some 
other languages) makes sense and keeps things nice and standard.



import net.php.pecl.Tidy into TidySpace; # into namespace
import org.nicedom.alwaysusethese.*; # why not?

How does PHP work out where these packages are?

see above + in this case compiler would loop through the directory
'org/nicedom/alway/usethese/' and include all files (one class per file)


The ability to have multiple namespaces per file leads to issues with 
the as or into syntax. Which namespace from that file are you 
aliasing? This ambiguity is a killer.
internal virtual namespace within that class only; for internal use by 
that class; non accessible to anything else - to allow for function 
libraries that aren't in packages / classes and could have conflicting 
function names. Rather than including a couple of files normally; it 
makes sense to me to import the contents of these function libs into a 
temporary internal namespace. I fear I have not the words; but *I* know 
I mean :p





public class MyClass # visibility on classes
{
  private $dba:DbHandlerA = new DbHandlerA();
  private $dbb:DbHandlerB = new DbHandlerB();
Can't do this. This would require the compilation phase to execute 
code. This is what constructors were made for.

my mistake I meant:
private DbHandlerA $dba = new DbHandlerA();
private DbHandlerB $dbb = new DbHandlerB();
scope type variablename = new class();

obviously calling __construct as per normal.


Except you can't, like I said. Try it. You cannot execute code during 
variable declaration in classes, you can only initialise to literal 
values.
indeed you can't; but you can in other languages and this is all 
entirely functional; tis a feature of as3 that I like :)



  {
if( TidySpace::tidy_is_xml( $xml ) ) { #namespace function call
  $this-xmlString = TidySpace::tidy_repair_string( $xml );
One would hope that when namespaces are ubiquitous there will be no 
need to prefix functions with package identifiers.


surely that would defeat the point of namespaces.. if the function 
exists in two or more namespaces/packages then namespace prefix is 
required.


I'm not referring to the namespace prefix, I'm referring to the tidy_ 
prefix.
ahhh I misread; yeah that's the idea of the import file into namespace 
- we could all loose those function prefixes :) however there would 
still be old function libraries written like this we may need to import 
[/include/]





with NAMESPACE {

}
syntax would be cool as well


Agreed.


+1 from me too [again lol]
all purely a made up example; I'd be interested to here any 
comments or what your ideal language (/modified php) would look like.
I've never really thought about how I'd like a languages syntax to 
be, I've just accepted the way it is. Having said that I've built a 
couple of compilers in my time and for the most part they were a 
combination of C, C++ and Perl, much like PHP. So in that respect 
PHP is the one that clearly makes the most sense to me for 
procedural languages.
In terms of OO I've always liked the Objective-C way of doing 
things. It seems more natural than the C++ syntax.

-Stut


why not throw out your ideal/made up procedural php language syntax; 
would be interested to see how what I as an OO dev would prefer 
compares to what you as a procedural dev would prefer.


Unfortunately they've all been proprietary, but the basic syntax for 
all of them was similar to PHP and they didn't have complex concepts 
like packages or classes and only one of them had functions.


thanks for the reply - probably a wasted convo but an interesting one 
that may lead somewhere!


Namespace syntax 

Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Daniel Brown
On Tue, Sep 30, 2008 at 11:57 AM, Jim Lucas [EMAIL PROTECTED] wrote:

 I hate it when I have to explain the jokes...

Aww, poor Jim.  ;-P

I got it.  I'm surprised Nate didn't.

-- 
/Daniel P. Brown
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Nathan Rixham

Jim Lucas wrote:

Nathan Rixham wrote:

Jim Lucas wrote:

Nathan Rixham wrote:

Richard Heyes wrote:

Thanks for quoting the whole message then!  :P

Maybe he just wanted to make sure you got it...


I'm always really tight on these guy's - but it is just somebody
offering us a job I guess; they could have scoured the boards; ripped
every email address and spammed the hell out of us if they'd wanted.

Why do you think they are looking for a programmer...


seriously? subject being Wanted PHP Developers..



Come on, read the last line before my previous reply.   Here, let me get you
an excerpt:

they could have scoured the boards; ripped every email address and
spammed the hell out of us if they'd wanted.

Now, I'll put it together for you...

They want a programmer to be able to write a program to rip all the
email address from the various websites that have all our email address

I hate it when I have to explain the jokes...


*lightbulb* thanks for explaining + ah ha ha ha ha

:p

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Making $_POST and $_FILES play together nicely

2008-09-30 Thread Mike Potter
Hi,

I have a PHP5 .class file that validates form inputs and sends
notification emails from contact pages. Recently a client wanted to
add a file upload function. No sweat, I thought.

Well, I can't get the $_FILES portion to validate properly in my
.class file, since it apparently only registers the $_POST vars. This
is the section of code, *currently functional as-is* that I need to
modify so that $_FILES is also processed:

public function validateForm() {
$requiredFields = array( name = My Name, phone = My
Telephone, email = My Email,
 file = My Upload File, comments = My Comments );

if( isset( $_POST )  is_array( $_POST )  count( $_POST )  
0 ) {
$reqFieldsPresent = true;
$this-msg = pThe following required fields were not 
filled out:/pul;
foreach( $requiredFields as $field = $value ) {
if( !isset( $_POST[ $field ] ) ||
 $_POST[ $field ] ==  
||
 $_POST[ $field ] == 
$value ) {
$reqFieldsPresent = false;
$this-msg .= li . $value . /li;

}

How can I modify this so that if $_FILES['userfile']['name'] is
present the fileUpload() function can be invoked and the file uploaded
to the client's server, but if the upload file has not been specified
the absence will be reported same as if $_POST['name'] is absent?

Ski

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Wolf
 Nathan Rixham [EMAIL PROTECTED] wrote: 
 Jim Lucas wrote:
  Nathan Rixham wrote:
  Jim Lucas wrote:
  Nathan Rixham wrote:
  Richard Heyes wrote:
  Thanks for quoting the whole message then!  :P
  Maybe he just wanted to make sure you got it...
!-- SNIP --

I just wish you guys would stop giving them ideas!  And then copying it back on 
the list and explaining...  Sheesh!  :-P

Is it 5 yet?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread Stut

On 30 Sep 2008, at 16:57, Nathan Rixham wrote:

Stut wrote:

On 30 Sep 2008, at 14:00, Nathan Rixham wrote:

Stut wrote:

On 29 Sep 2008, at 12:47, Nathan Rixham wrote:

import com.anotherdom.MysqlDbHandler as DbHandlerA;
import com.somedom.DbHandler as DbHandlerB; # as makes this  
easier

import com.mydom.thatpackage.RssParser; # we don't have to as
Would this then be available as RssParser:: or would you need to  
specify the full name.

just RssParser.. I'd see import being a replacement for include
import com.mydom.thatpackage.RssParser;
same as
import '/classpath/com/mydom/thatpackage/RssParser.php';


Where did /classpath come from? Seems to me that's no better than  
simply using include. I see no value in replacing / with . in the  
path.
/classpath was purely an illustration; the idea (or my thought  
behind) replacing / with . and using packages as such; would be do  
give all of us developers a set standard for file hierarchy /  
storing classes - think java classes/packages actionscript 3  
classes; never any cross over; doesn't matter if 3 different  
companies all have a /db/handler.php as it's always saved in net/ 
companydomain/packagename/db/handler.php - again back to the  
classpath; illustrating a set class root directory for all classes.


/classes/
/modules/
/templates/
etc; but only defining /classes at this time

to me anyways; this form of working in java and actionscript 3 (and  
some other languages) makes sense and keeps things nice and standard.


Hasn't this already been attempted with PEAR? Don't get me wrong, I  
really like the idea. And when phar becomes ubiquitous I would love to  
see this adopted as a standard installation structure for libraries  
but I can't see it happening, at least not enough for it to change the  
behaviour of file inclusion. But you can hope I guess.



import net.php.pecl.Tidy into TidySpace; # into namespace
import org.nicedom.alwaysusethese.*; # why not?

How does PHP work out where these packages are?

see above + in this case compiler would loop through the directory
'org/nicedom/alway/usethese/' and include all files (one class per  
file)


The ability to have multiple namespaces per file leads to issues  
with the as or into syntax. Which namespace from that file are  
you aliasing? This ambiguity is a killer.
internal virtual namespace within that class only; for internal use  
by that class; non accessible to anything else - to allow for  
function libraries that aren't in packages / classes and could have  
conflicting function names. Rather than including a couple of files  
normally; it makes sense to me to import the contents of these  
function libs into a temporary internal namespace. I fear I have not  
the words; but *I* know I mean :p


Consider this...

file1.php:
package arse
{
class bandit
{
...
}
}
package nipple
{
class clamp
{
...
}
}

file2.php:
import file1 as chest;

Which package have I aliased as chest in file2.php?

This could be solved using import file1 into chest which presumably  
would then give me chest::arse::bandit and chest::nipple::clamp but  
that's pretty nasty.



public class MyClass # visibility on classes
{
 private $dba:DbHandlerA = new DbHandlerA();
 private $dbb:DbHandlerB = new DbHandlerB();
Can't do this. This would require the compilation phase to  
execute code. This is what constructors were made for.

my mistake I meant:
private DbHandlerA $dba = new DbHandlerA();
private DbHandlerB $dbb = new DbHandlerB();
scope type variablename = new class();

obviously calling __construct as per normal.


Except you can't, like I said. Try it. You cannot execute code  
during variable declaration in classes, you can only initialise to  
literal values.
indeed you can't; but you can in other languages and this is all  
entirely functional; tis a feature of as3 that I like :)


This is a pretty fundamental limitation of the way PHP works. I don't  
see it changing anytime soon, and I'm pretty happy about that.  
Initialisations like this are only really useful in static classes  
where you don't have a constructor. Personally I'd not use this  
ability if it did exist because I prefer to use constructors to group  
initialisations together but each to their own.





-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jim Lucas
Wolf wrote:
  Nathan Rixham [EMAIL PROTECTED] wrote: 
 Jim Lucas wrote:
 Nathan Rixham wrote:
 Jim Lucas wrote:
 Nathan Rixham wrote:
 Richard Heyes wrote:
 Thanks for quoting the whole message then!  :P
 Maybe he just wanted to make sure you got it...
 !-- SNIP --
 
 I just wish you guys would stop giving them ideas!  And then copying it back 
 on the list and explaining...  Sheesh!  :-P
 
 Is it 5 yet?
 

Good thing is, afaik, they haven't got that developer yet that can do it.. :)

-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Digital signature

2008-09-30 Thread Balasubramanyam A
Hello,

Is it possible to digitally signature on PHP document using PHP?

Balu


RE: [PHP] Digital signature

2008-09-30 Thread Boyd, Todd M.
 -Original Message-
 From: Balasubramanyam A [mailto:[EMAIL PROTECTED]
 Is it possible to digitally signature on PHP document using PHP?

S. T. F. W.

http://www.pgpi.org/

That should at least get you started.


Todd Boyd
Web Programmer




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] db_* = pg_*/my_*/ifx_* ?

2008-09-30 Thread Nilesh Govindrajan
On Saturday 27 September 2008 10:01:51 pm Michelle Konzack wrote:
 Hello,

 I am using some crapy software,  which  does  not  allow  switching  the
 Database, where I use PostgreSQL since 1999  and  those  crapy  software
 force me to install mysql, sqlite and  other  databases  which  let  the
 administration, maintenance AND COSTS explode...

 My own tools are generaly build for PostgreSQL but very adaptive,  since
 I use and include (e.g.:  db_pgsql.inc) with the neccesary  functions.

 This mean, I can create a db_mysql.inc and change the include  path  and
 all is working as expected.

 Now my question is:

 Is there a tool which support such thing already or
 do I have to do this crap for each software I code?

 Thanks, Greetings and nice Day/Evening
 Michelle Konzack
 Systemadministrator
 24V Electronic Engineer
 Tamay Dogan Network
 Debian GNU/Linux Consultant

you'll have to change the sql queries in your applications, etc., etc. and 
also you will have to move data from pgsql to mysql by some method (like 
XML ?)


signature.asc
Description: This is a digitally signed message part.


Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread Nathan Rixham

Stut wrote:

On 30 Sep 2008, at 16:57, Nathan Rixham wrote:

Stut wrote:

On 30 Sep 2008, at 14:00, Nathan Rixham wrote:

Stut wrote:

On 29 Sep 2008, at 12:47, Nathan Rixham wrote:

import com.anotherdom.MysqlDbHandler as DbHandlerA;
import com.somedom.DbHandler as DbHandlerB; # as makes this easier
import com.mydom.thatpackage.RssParser; # we don't have to as
Would this then be available as RssParser:: or would you need to 
specify the full name.

just RssParser.. I'd see import being a replacement for include
import com.mydom.thatpackage.RssParser;
same as
import '/classpath/com/mydom/thatpackage/RssParser.php';


Where did /classpath come from? Seems to me that's no better than 
simply using include. I see no value in replacing / with . in the path.
/classpath was purely an illustration; the idea (or my thought behind) 
replacing / with . and using packages as such; would be do give all of 
us developers a set standard for file hierarchy / storing classes - 
think java classes/packages actionscript 3 classes; never any cross 
over; doesn't matter if 3 different companies all have a 
/db/handler.php as it's always saved in 
net/companydomain/packagename/db/handler.php - again back to the 
classpath; illustrating a set class root directory for all classes.


/classes/
/modules/
/templates/
etc; but only defining /classes at this time

to me anyways; this form of working in java and actionscript 3 (and 
some other languages) makes sense and keeps things nice and standard.


Hasn't this already been attempted with PEAR? Don't get me wrong, I 
really like the idea. And when phar becomes ubiquitous I would love to 
see this adopted as a standard installation structure for libraries but 
I can't see it happening, at least not enough for it to change the 
behaviour of file inclusion. But you can hope I guess.




not sure.. for some reason I always bypass pear whenever possible; 
probably because I like the excuse to re-invent the wheel :)



import net.php.pecl.Tidy into TidySpace; # into namespace
import org.nicedom.alwaysusethese.*; # why not?

How does PHP work out where these packages are?

see above + in this case compiler would loop through the directory
'org/nicedom/alway/usethese/' and include all files (one class per 
file)


The ability to have multiple namespaces per file leads to issues with 
the as or into syntax. Which namespace from that file are you 
aliasing? This ambiguity is a killer.
internal virtual namespace within that class only; for internal use by 
that class; non accessible to anything else - to allow for function 
libraries that aren't in packages / classes and could have conflicting 
function names. Rather than including a couple of files normally; it 
makes sense to me to import the contents of these function libs into a 
temporary internal namespace. I fear I have not the words; but *I* 
know I mean :p


Consider this...

file1.php:
package arse
{
class bandit
{
...
}
}
package nipple
{
class clamp
{
...
}
}

file2.php:
import file1 as chest;

Which package have I aliased as chest in file2.php?

This could be solved using import file1 into chest which presumably 
would then give me chest::arse::bandit and chest::nipple::clamp but 
that's pretty nasty.




see I'd lock it to one class per file; multiple files/classes per 
package :) I think one should always keep their arse and nipple seperate.


consider:

file: /classes/net/stut/body/arse.php
package net.stut.body.arse
{
class bandit
{
...
}
}

file: /classes/net/stut/body/nipple.php
package net.stut.body.nipple
{
class clamp
{
...
}
}

file: /classes/net/stut/body/chest.php
package /classes/net/stut/body/chest
{
import net.stut.body.nipple;
class chest
{
...
}
}

or

file: /classes/net/stut/body/chest.php
import net.stut.body.nipple;
$u = new arse::bandit;

whhiihhh leads me back to my earlier q of how 
would this new style work when doing things the procedural way.. even 
the above three lines; any potential problems there?



public class MyClass # visibility on classes
{
 private $dba:DbHandlerA = new DbHandlerA();
 private $dbb:DbHandlerB = new DbHandlerB();
Can't do this. This would require the compilation phase to execute 
code. This is what constructors were made for.

my mistake I meant:
private DbHandlerA $dba = new DbHandlerA();
private DbHandlerB $dbb = new DbHandlerB();
scope type variablename = new class();

obviously calling __construct as per normal.


Except you can't, like I said. Try it. You cannot execute code during 
variable declaration in classes, you can only initialise to literal 
values.
indeed you can't; but you can in other languages and this is all 
entirely functional; tis a feature of as3 that I like :)


This is a pretty fundamental limitation of the way PHP works. I don't 
see it changing anytime soon, and I'm pretty happy about that. 
Initialisations like this are 

Re: [PHP] db_* = pg_*/my_*/ifx_* ?

2008-09-30 Thread uaca man
nathan, if you are not going to help, DON´T answer.

Michelle, there are many options, a few are available at pear.php.net,
take a look at the pear MDB2 package it is probably what you want.


Angelo



2008/9/27 Michelle Konzack [EMAIL PROTECTED]:
 Hello,

 I am using some crapy software,  which  does  not  allow  switching  the
 Database, where I use PostgreSQL since 1999  and  those  crapy  software
 force me to install mysql, sqlite and  other  databases  which  let  the
 administration, maintenance AND COSTS explode...

 My own tools are generaly build for PostgreSQL but very adaptive,  since
 I use and include (e.g.:  db_pgsql.inc) with the neccesary  functions.

 This mean, I can create a db_mysql.inc and change the include  path  and
 all is working as expected.

 Now my question is:

Is there a tool which support such thing already or
do I have to do this crap for each software I code?

 Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


 --
 Linux-User #280138 with the Linux Counter, http://counter.li.org/
 # Debian GNU/Linux Consultant #
 Michelle Konzack   Apt. 917  ICQ #328449886
 +49/177/935194750, rue de Soultz MSN LinuxMichi
 +33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Making $_POST and $_FILES play together nicely

2008-09-30 Thread Nilesh Govindrajan
On Tuesday 30 September 2008 09:41:33 pm Mike Potter wrote:
 Hi,

 I have a PHP5 .class file that validates form inputs and sends
 notification emails from contact pages. Recently a client wanted to
 add a file upload function. No sweat, I thought.

 Well, I can't get the $_FILES portion to validate properly in my
 .class file, since it apparently only registers the $_POST vars. This
 is the section of code, *currently functional as-is* that I need to
 modify so that $_FILES is also processed:

   public function validateForm() {
   $requiredFields = array( name = My Name, phone = My
 Telephone, email = My Email,
file = My Upload File, comments = My Comments );

   if( isset( $_POST )  is_array( $_POST )  count( $_POST )  
 0 ) {
   $reqFieldsPresent = true;
   $this-msg = pThe following required fields were not 
 filled
 out:/pul; foreach( $requiredFields as $field = $value ) {
   if( !isset( $_POST[ $field ] ) ||
$_POST[ $field ] ==  
 ||
$_POST[ $field ] == 
 $value ) {
   $reqFieldsPresent = false;
   $this-msg .= li . $value . /li;

   }

 How can I modify this so that if $_FILES['userfile']['name'] is
 present the fileUpload() function can be invoked and the file uploaded
 to the client's server, but if the upload file has not been specified
 the absence will be reported same as if $_POST['name'] is absent?

 Ski

How about using -

if(is_uploaded_file($_FILES['userfile']['tmp_name'])) {

//success code

} else {

//failure code

}


signature.asc
Description: This is a digitally signed message part.


Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jason Pruim


On Sep 30, 2008, at 12:31 PM, Jim Lucas wrote:


Wolf wrote:

 Nathan Rixham [EMAIL PROTECTED] wrote:

Jim Lucas wrote:

Nathan Rixham wrote:

Jim Lucas wrote:

Nathan Rixham wrote:

Richard Heyes wrote:

Thanks for quoting the whole message then!  :P

Maybe he just wanted to make sure you got it...

!-- SNIP --

I just wish you guys would stop giving them ideas!  And then  
copying it back on the list and explaining...  Sheesh!  :-P


Is it 5 yet?



Good thing is, afaik, they haven't got that developer yet that can  
do it.. :)


*Lightbulb*... I could make money grabbing everyones email addy's and  
selling/spamming them... ;)




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Wolf
!-- SNIP -- *Lightbulb*... I could make money 

*snatches lightbulb down and replaces it with burned out one*

Must resist fist of death

:)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread VamVan
Job Description is awesome though. My first instinct was to jump in to it
right away. But there are some red flags as their website looks too
immature. Hard to believe !!!

On Tue, Sep 30, 2008 at 9:47 AM, Jason Pruim [EMAIL PROTECTED] wrote:


 On Sep 30, 2008, at 12:31 PM, Jim Lucas wrote:

  Wolf wrote:

  Nathan Rixham [EMAIL PROTECTED] wrote:

 Jim Lucas wrote:

 Nathan Rixham wrote:

 Jim Lucas wrote:

 Nathan Rixham wrote:

 Richard Heyes wrote:

 Thanks for quoting the whole message then!  :P

 Maybe he just wanted to make sure you got it...

 !-- SNIP --

 I just wish you guys would stop giving them ideas!  And then copying it
 back on the list and explaining...  Sheesh!  :-P

 Is it 5 yet?


 Good thing is, afaik, they haven't got that developer yet that can do it..
 :)


 *Lightbulb*... I could make money grabbing everyones email addy's and
 selling/spamming them... ;)



 --

 Jason Pruim
 Raoset Inc.
 Technology Manager
 MQC Specialist
 11287 James St
 Holland, MI 49424
 www.raoset.com
 [EMAIL PROTECTED]






 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jay Blanchard
[snip]
Must resist fist of death
[/snip]

Props for the Dilbert reference

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Zend_Form: How to change positions of elements ?

2008-09-30 Thread Thodoris



Hi,

I am new to Zend Framework.

I would like to know how to change the positions of elements created using 
Zend_Form. 

I mean that how do I place two elements one near other instead of in a 
top-down manner ?


  


Since I am also new to Zend Framework and I am having the same 
difficulties with Zend_Form I am asking you to suggest the proper mail list.


I am going to post here anyway what I need and if anyone can help this 
could be really a relief.



I have a controller that has a two functions like this:

public function getForm() {


$form = new Zend_Form();
$form-setAction('/clients/find')
-setMethod('post')
-addDecorators($decorators)
-setAttrib('id','formSearchClient')
-addElement('text','Name')
-addElement('text','NIN')
-addElement('text','IdNo')
-addElement('submit','?');
return $form-render();

}

public function indexAction() {

}

public function searchAction() {
$this-view-html = $this-getForm();
}


And inside the view I wrote something like this:


?php
require 'header.phtml';

print $this-html;

require 'footer.phtml';
?

My problem is that I want to put the form into a table where every form 
element is going to take two cells one for the label and one for the input.


I am trying to use ViewHelpers instead of writing html directly but I 
can't do this right and I am going through the manual again and again 
without any success. The table is started before in the header.phtml but 
I will have to put td and tr tags some way.


Any suggestions will be much of a help or even some good book 
recommendations for the framework.


Thank you for taking the time reading this.

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread tedd

At 4:29 PM +0100 9/30/08, Richard Heyes wrote:

  BTW -- What is it with you and graphs? Are you creating a library for

 charting?


Created:

http://www.phpguru.org/RGraph

--
Richard Heyes



Far out -- that's neat.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Time Loop

2008-09-30 Thread MDB

Thank you, I will try that out.

Robert Cummings [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

On Mon, 2008-09-29 at 17:01 -0400, MDB wrote:
Hello All, I am trying to figure out how to loop through 2 given times. 
I
have a start time and a end time and want to look through every X mins 
and
add a radio button.  Below is my latest try, can someone please help me 
out?



  $endTime = 17:00:00;
  $currentTime=09:00:00;

  $num_intervals = floor(($endTime - $currentTime) / 30);


You should convert your times to minutes so you can use minute
intervals... the following was written directly into the email and so it
is UNTESTED:

?php

   $bits = explode( ':', $currentTime );
   $currentTime = $bits[0] * 60 + $bits[1];

   $bits = explode( ':', $endTime );
   $endTime = $bits[0] * 60 + $bits[1];

   $interval = 15; // minutes
   for( $i = $currentTime; $i = $endTime; $i += $interval )
   {
   $time = floor( $i / 60 ).':'.($i % 60).':00';
   }

?

Adapt to fit your needs.

Note: I used a time interval like you state in your above description (X
mins). But the code you submitted used appeared to use number of time
slices instead.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Zend_Form: How to change positions of elements ?

2008-09-30 Thread Colin Guthrie

Thodoris wrote:
Since I am also new to Zend Framework and I am having the same 
difficulties with Zend_Form I am asking you to suggest the proper mail 
list.


The php-general mailing list is a general purpose mailing list and 
should be used for general purpose How do I do this in PHP? or What 
is the syntax for doing xyz in PHP? etc.


The php-general mailing list is read by many experienced and friendly 
PHP developers, but only a percentage of them will know anything about 
the Zend Framework.


If you have a question about anything related to the Zend Framework API 
and how to work with Zend Framework objects, then you should *not* ask 
on a general purpose PHP mailing-list where only a small percentage of 
people will be interested and an even smaller percentage will be able to 
help. The most appropriate place for such an enquiry is the Zend 
Framework mailing list.


If in doubt, pick *one* list and if you picked wrongly, you will be 
redirected by someone on that list who will no doubt explain why your 
question is inappropriate.


So please don't cross post unnecessarily.

Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread tedd

At 4:27 PM +0100 9/30/08, Stut wrote:

As examples check out the following pages (under the orange bar)...

http://uk.freeads.net/


Stut:

I can understand:

Travel  Holidays

Because the user moves to the Holidays page from the Travel page. 
In fact, there's no way to get to the Holidays page other than from 
Travel page and thus a good reason for leaving a bread crumb trail.


But what's the point of having UK  Motors? Aren't they on the same level?

It's likewise with your other examples.

What's the rational behind showing two bread crumbs when one will do?

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread tedd

At 7:49 AM -0700 9/30/08, Jim Lucas wrote:

Why do you think they are looking for a programmer...


Because they ran out of people who can really screw things up.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Zend_Form: How to change positions of elements ?

2008-09-30 Thread Thodoris



Thodoris wrote:
Since I am also new to Zend Framework and I am having the same 
difficulties with Zend_Form I am asking you to suggest the proper 
mail list.


The php-general mailing list is a general purpose mailing list and 
should be used for general purpose How do I do this in PHP? or What 
is the syntax for doing xyz in PHP? etc.


The php-general mailing list is read by many experienced and friendly 
PHP developers, but only a percentage of them will know anything about 
the Zend Framework.




That is true but still there is this percentage that exists. In case you 
need help you ask and everyone that can reply will do so. Anyone who 
doesn't know the answer or doesn't care for the subject will not.


I think this was the way that lists worked.

If you have a question about anything related to the Zend Framework 
API and how to work with Zend Framework objects, then you should *not* 
ask on a general purpose PHP mailing-list where only a small 
percentage of people will be interested and an even smaller percentage 
will be able to help. The most appropriate place for such an enquiry 
is the Zend Framework mailing list.




I subscribed eventually...

If in doubt, pick *one* list and if you picked wrongly, you will be 
redirected by someone on that list who will no doubt explain why your 
question is inappropriate.




I just did... I am not the OP in case you didn't  notice.


So please don't cross post unnecessarily.

Col

It won't happen again I promise :-) . It is the damn reply all  button 
that does all the ugly demonic things these days.


--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread tedd

At 9:51 AM -0700 9/30/08, VamVan wrote:

Job Description is awesome though. My first instinct was to jump in to it
right away. But there are some red flags as their website looks too
immature. Hard to believe !!!


That's my instinct as well.

If a company is advertising for web programmers and doesn't have it's 
own web site in order, then I suspect there is a disconnect between 
management and their technical staff (if they have any). If they 
won't listen to their own people, or they don't know any better, then 
I don't want to work for them.


From my experience, you can save yourself a lot of headache by 
choosing clients that aren't ignorant.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Questions regarding limits of processes launched by system, exec,passthru ...

2008-09-30 Thread Thodoris



Hello all again,

It seems that Problem can only be solved by one of the following ways:

1. Don't use mod_php; use CGI or FastCGI instead. Then it would be
   possible to limit the resources via RLimitCPU / RLimitMEM.



I haven't tried that but as I have noticed in the reference that 
probably mod_php's processes get limited too:


This applies to processes forked off from Apache children servicing 
requests, not the Apache children themselves.
This includes CGI scripts and SSI exec commands, but not any processes 
forked off from the Apache parent such as piped logs.


It says that it includes CGI but it doesn't exclude necessarily mod_php. 
Does it ?



2. Use one of the following apache core patch
http://archives.neohapsis.com/archives/openbsd/2005-12/1436.html
   or the following apache module:
http://www.ucc.asn.au/~dagobah/things/mod_rlimit.c
   (Unfortunately only for apache 1.3)

Thanks for all your answers.

Kind regards
valli



Let us know if you try this.

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread tedd

At 3:36 PM +0100 9/30/08, Stut wrote:
There was a cracking suggestion a week or so ago that the $ prefix 
for variables should be removed. Can you imagine the community 
backlash at such a pointless change!!


-Stut


Well... there's always one. I try hard not to be it.  :-)

I just learned the other day that javascript variables can have the $ 
prefix. Here I've been writing js for years and never knew that.


Languages keep looking more and more alike -- but then again, without 
my glasses everything does.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Daniel Brown
On Tue, Sep 30, 2008 at 1:34 PM, tedd [EMAIL PROTECTED] wrote:
 At 9:51 AM -0700 9/30/08, VamVan wrote:

 Job Description is awesome though. My first instinct was to jump in to it
 right away. But there are some red flags as their website looks too
 immature. Hard to believe !!!

 That's my instinct as well.

 If a company is advertising for web programmers and doesn't have it's own
 web site in order, then I suspect there is a disconnect between management
 and their technical staff (if they have any). If they won't listen to their
 own people, or they don't know any better, then I don't want to work for
 them.

That's not always the case though.  It's not in my case, for
example.  My company's website isn't up and running, but I'm able to
keep my staff busy and paid every day.

Then again, I don't publicly-advertise job openings yet.  So
it doesn't apply to my situation exactly but just something worth
noting.

-- 
/Daniel P. Brown
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Digital signature

2008-09-30 Thread Balasubramanyam A
Hello Todd,

Sorry about the typo error in my previous email. My question is, how to
digitally sign on PDF document using PHP?

I searched web, but could not get more information on this topic. Could you
please give me an example on how to digitally sign on PDF document using
PHP?

Balu




On Tue, Sep 30, 2008 at 10:08 PM, Boyd, Todd M. [EMAIL PROTECTED] wrote:

  -Original Message-
  From: Balasubramanyam A [mailto:[EMAIL PROTECTED]
  Is it possible to digitally signature on PHP document using PHP?

 S. T. F. W.

 http://www.pgpi.org/

 That should at least get you started.


 Todd Boyd
 Web Programmer




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Sterilizing regexp

2008-09-30 Thread Frank Stanovcak
A while ago I asked a question and got a few answers, so I thought I would 
toss this out there as a follow up.  I'm going to be using this to return 
filtered regexp values for a user interface.

I haven't had a chance to enter this into my code yet, so if anyone sees 
something wrong please hammer away, otherwise I hope it helps save some one 
some time.

function regexp_sanitize($string,$regexp) {
if(isarray($string)) {
foreach($string as $key = $value) {
$count = preg_match($regexp,$value,$matches) {
if($count != 1) {
$result[$key] = FALSE;
} else {
foreach($matches as $toss = $matchval) {
$result[$key] = $matchval;
};
};
};
} else {
$count = preg_match($regexp,$string,$matches);
if($count != 1) {
$result = FALSE;
} else {
$result = $matches[0];
};
};
return($result);
}; 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sepating MySQL result set into html tables

2008-09-30 Thread Thodoris



At 8:32 PM +0300 9/26/08, Thodoris wrote:


Yes it will but I will make this better along with other things as 
long as I find the needed algorithm.


--
Thodoris


http://webbytedd.com/bbb/paging/

The code is there.

Cheers,

tedd



Thanks Tedd this does the paging but it wasn't what I asked on the first 
place. Check on the rest postings on the thread...


--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Robert Cummings
On Tue, 2008-09-30 at 13:34 -0400, tedd wrote:
 At 9:51 AM -0700 9/30/08, VamVan wrote:
 Job Description is awesome though. My first instinct was to jump in to it
 right away. But there are some red flags as their website looks too
 immature. Hard to believe !!!
 
 That's my instinct as well.
 
 If a company is advertising for web programmers and doesn't have it's 
 own web site in order, then I suspect there is a disconnect between 
 management and their technical staff (if they have any). If they 
 won't listen to their own people, or they don't know any better, then 
 I don't want to work for them.
 
  From my experience, you can save yourself a lot of headache by 
 choosing clients that aren't ignorant.

I'm not really getting into this discussion... but thought there's a bit
of a chicken/egg issue at play. It may be the first thing they want a
new hire to do is fix their own web page. If that were true then
understandably their site would be in need of work until such time as
they secure a developer.

BTW, while we're off topic... my wife delivered our third child (second
boy) 3 minutes after midnight yesterday :)

Cheers,
Rob.

Ps. Yes! this does imply that I don't just use Jochem's blow
up doll ;)
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sterilizing regexp

2008-09-30 Thread Per Jessen
Frank Stanovcak wrote:

 A while ago I asked a question and got a few answers, so I thought I
 would toss this out there as a follow up.  I'm going to be using this
 to return filtered regexp values for a user interface.
 
 I haven't had a chance to enter this into my code yet, so if anyone
 sees something wrong please hammer away, otherwise I hope it helps
 save some one some time.

I think I'm missing the purpose - your code looks like you've wrapped a
function around preg_match() so you can pass arrays to it as well, but
I don't see much sanity anywhere :-)


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Robert Cummings

2008-09-30 Thread Daniel Brown
All:

What was pointed as a passing mention in one thread I thought was
worth note in a thread of its own.  As quoted by Rob:

 BTW, while we're off topic... my wife delivered our third child (second
 boy) 3 minutes after midnight yesterday :)

I'd say that deserves a round of congratulations.  Many - most,
probably - of you know Rob from here, and have seen his help and
dedication - as well as his annoying wit ;-P - offered to any and all
on this list.  Quite often, it's offered when you don't especially
want it.  Nonetheless, it's great news, and I think we should all take
a moment and wonder: why the hell aren't you at the hospital with your
wife and newborn son, Rob?  ;-P

Congrats to the Cummings family!

-- 
/Daniel P. Brown
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Wolf
 Daniel Brown [EMAIL PROTECTED] wrote: 
 All:
 
 What was pointed as a passing mention in one thread I thought was
 worth note in a thread of its own.  As quoted by Rob:
 
  BTW, while we're off topic... my wife delivered our third child (second
  boy) 3 minutes after midnight yesterday :)
 
 I'd say that deserves a round of congratulations.  Many - most,
 probably - of you know Rob from here, and have seen his help and
 dedication - as well as his annoying wit ;-P - offered to any and all
 on this list.  Quite often, it's offered when you don't especially
 want it.  Nonetheless, it's great news, and I think we should all take
 a moment and wonder: why the hell aren't you at the hospital with your
 wife and newborn son, Rob?  ;-P
 
 Congrats to the Cummings family!

He's just on Wi-Fi there while she's sleeping!  And playing with the kids.  :)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Robert Cummings

2008-09-30 Thread Jay Blanchard
[snip]

[/snip]

Congrats Cummings Clan! 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Dan Joseph
On Tue, Sep 30, 2008 at 2:12 PM, Daniel Brown [EMAIL PROTECTED] wrote:

  I'd say that deserves a round of congratulations.  Many - most,


Congratulations!  May he grown strong and bring you honor!

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life.


RE: [PHP] Digital signature

2008-09-30 Thread Boyd, Todd M.
From: Balasubramanyam A [mailto:[EMAIL PROTECTED] 

Hello Todd,

Sorry about the typo error in my previous email. My question is, how to
digitally sign on PDF document using PHP?

I searched web, but could not get more information on this topic. Could
you please give me an example on how to digitally sign on PDF document
using PHP?


On Tue, Sep 30, 2008 at 10:08 PM, Boyd, Todd M. [EMAIL PROTECTED]
wrote:
 -Original Message-
 From: Balasubramanyam A [mailto:[EMAIL PROTECTED]
 Is it possible to digitally signature on PHP document using PHP?
S. T. F. W.

http://www.pgpi.org/

That should at least get you started.





A.) Try to use plain text e-mails whenever possible. This is a wide-base
distribution list, and it is the easiest way to ensure that your text
ends up the way you intended (also--hard to quote an HTML message, as
you can see).

B.) Please, do not top post (add your reply text to the top of your
message). It is the convention of this list (and for that matter, most
all lists) to bottom post, or add your text to the bottom of the reply
message. It is also more linear given the human perception of the 4th
dimension. Imagine a joke:

  To get to the other side.
  Why did the chicken cross the road?

  The joke is hard to follow that way, huh?

C.) I searched google.com with these keywords: sign pdf in php
In the first 10 results were these:

*
http://www.setasign.de/products/pdf-php-solutions/setapdf-signer/sign-pd
f.php
* http://www.aloaha.com/wi-software-en/sign-pdf.php
* http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=8000

Run with it.


Todd Boyd
Web Programmer

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Steve Holmes
On Tue, Sep 30, 2008 at 2:12 PM, Daniel Brown [EMAIL PROTECTED] wrote:

All:

What was pointed as a passing mention in one thread I thought was
 worth note in a thread of its own.  As quoted by Rob:

  BTW, while we're off topic... my wife delivered our third child (second
  boy) 3 minutes after midnight yesterday :)


Congratulations Rob and family! And many blessings as well.
Steve.Holmes
Purdue University


RE: [PHP] Sterilizing regexp

2008-09-30 Thread Boyd, Todd M.
 -Original Message-
 From: Frank Stanovcak [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 30, 2008 12:45 PM
 To: php-general@lists.php.net
 Subject: [PHP] Sterilizing regexp
 
 A while ago I asked a question and got a few answers, so I thought I
 would
 toss this out there as a follow up.  I'm going to be using this to
 return
 filtered regexp values for a user interface.
 
 I haven't had a chance to enter this into my code yet, so if anyone
 sees
 something wrong please hammer away, otherwise I hope it helps save
some
 one
 some time.
 
 function regexp_sanitize($string,$regexp) {
 if(isarray($string)) {
 foreach($string as $key = $value) {
 $count = preg_match($regexp,$value,$matches) {
 if($count != 1) {
 $result[$key] = FALSE;
 } else {

I have a problem with this part right here:

 foreach($matches as $toss = $matchval) {
 $result[$key] = $matchval;
 };

If there are multiple matches, you will only wind up with the last match
in $result[$key].

 };
 };
 } else {
 $count = preg_match($regexp,$string,$matches);
 if($count != 1) {
 $result = FALSE;
 } else {
 $result = $matches[0];
 };
 };
 return($result);
 };

Also, I believe you want preg_match_all() if you're going to be wanting
to grab the matches. Note: MATCH and CAPTURE GROUP are not the same
thing. The $matches array you're working with from preg_match() should
contain the entire string that was matched in the first array slot and
subsequent capture groups--(.*?) for instance--in the remaining array
slots. preg_match_all() can be used to find multiple MATCHEs (perhaps
each with multiple CAPTURE GROUPs) if there are more than one in the
string being traversed.

HTH,


Todd Boyd
Web Programmer

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sterilizing regexp

2008-09-30 Thread Frank Stanovcak
I've got to pass about 9 or 10 calls to it, some of which will be arrays, 
and I have to do it from several different places.  Felt this was a bit more 
elegant than hard coding the pregmatches unless there is an easier way.

Per Jessen [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
Frank Stanovcak wrote:

 A while ago I asked a question and got a few answers, so I thought I
 would toss this out there as a follow up.  I'm going to be using this
 to return filtered regexp values for a user interface.

 I haven't had a chance to enter this into my code yet, so if anyone
 sees something wrong please hammer away, otherwise I hope it helps
 save some one some time.

I think I'm missing the purpose - your code looks like you've wrapped a
function around preg_match() so you can pass arrays to it as well, but
I don't see much sanity anywhere :-)


/Per Jessen, Zürich



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Thiago H. Pojda

 On Tue, Sep 30, 2008 at 3:12 PM, Daniel Brown [EMAIL PROTECTED] wrote:

All:

What was pointed as a passing mention in one thread I thought was
 worth note in a thread of its own.  As quoted by Rob:

  BTW, while we're off topic... my wife delivered our third child (second
  boy) 3 minutes after midnight yesterday :)

I'd say that deserves a round of congratulations.  Many - most,
 probably - of you know Rob from here, and have seen his help and
 dedication - as well as his annoying wit ;-P - offered to any and all
 on this list.  Quite often, it's offered when you don't especially
 want it.  Nonetheless, it's great news, and I think we should all take
 a moment and wonder: why the hell aren't you at the hospital with your
 wife and newborn son, Rob?  ;-P

Congrats to the Cummings family!


That's great news - perhaps now he won't have much time for emails ;)

Congratulations!!



 --
 /Daniel P. Brown



-- 
Thiago Henrique Pojda


Re: [PHP] Sterilizing regexp

2008-09-30 Thread Jim Lucas
Frank Stanovcak wrote:
 A while ago I asked a question and got a few answers, so I thought I would 
 toss this out there as a follow up.  I'm going to be using this to return 
 filtered regexp values for a user interface.
 
 I haven't had a chance to enter this into my code yet, so if anyone sees 
 something wrong please hammer away, otherwise I hope it helps save some one 
 some time.
 

To me, the name of your function indicates that you are making sure that the
regex is good.  Not that you are checking input against a regex.  I would use
something like  match_to_regex() or something like that.  My naming
conventions have never really been clear to anybody but me, so you might have
a better suggestion...

 function regexp_sanitize($string,$regexp) {

is, isarray() your own function?  PHP is is_array()
 if(isarray($string)) {
 foreach($string as $key = $value) {

This line is broken... Should it not end with a semi-colon?
 $count = preg_match($regexp,$value,$matches) {
 if($count != 1) {

# You are over writing the previous out put, should that be $results[$key][] =
 $result[$key] = FALSE;
 } else {
 foreach($matches as $toss = $matchval) {

# You are over writing the previous out put, should that be $results[$key][] =
 $result[$key] = $matchval;
 };
 };
 };
 } else {
 $count = preg_match($regexp,$string,$matches);
 if($count != 1) {
 $result = FALSE;
 } else {
 $result = $matches[0];
 };
 };
 return($result);
 }; 
 

what is up with all the semi-colons?  They are not needed.
 
 

Personally, I would do it this way.

?php

function match_to_regexp($input, $regexp) {

if ( !is_array($input) ) {

$input = array($input);

}

foreach($input AS $key = $value) {

if( preg_match_all($regexp, $value, $matches, PREG_SET_ORDER) ) {

array_shift($matches);

$result[$key] = $matches;

} else {

$result[$key][] = FALSE;

}

}

return $result;

}

?

Hope this helps.

-- 
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Zend_Form: How to change positions of elements ?

2008-09-30 Thread Colin Guthrie

Thodoris wrote:
The php-general mailing list is read by many experienced and friendly 
PHP developers, but only a percentage of them will know anything about 
the Zend Framework.


That is true but still there is this percentage that exists. In case you 
need help you ask and everyone that can reply will do so. Anyone who 
doesn't know the answer or doesn't care for the subject will not.


No, without meaning to offend, that's just being lazy! What it does is 
create fragmentation. If the person who replies is subscribed to one 
list and not the other, then their reply to your query will only be 
visible to the users of that list.


Another user on the other list may then take time out of their day to 
help you out without realising that you've got the help you need in the 
first list.


When that happens, people are (rightly) put out.

You'll noticed that you are now posting only on the php-general list... 
that's how I've replied to it too, but users of on the Zend list may not 
see my response. Which is OK as the php-general list tends to be filled 
with more chat/conversational stuff than the zend one anyway :)



I think this was the way that lists worked.


Cross posting is only justified in some cases. e.g. a big security 
warning in the Zend Framework could justify a posting only php-general 
too as it would be essential to reach those who may be affected. 
Likewise if there was a major problem in PHP itself (like the recent 
libxml 2.7.x problems with older PHP xml parsing routines), then posting 
to php-general is wise, but you may also help some people in the zend 
framework community by telling them too.


There are other examples of when cross posting is considered OK (e.g. 
development collaboration between multiple projects), but I can't list 
them all here... and it is fairly subjective!


In actual fact, when using usenet rather than mailing lists, there was 
not such a big problem as posting to a newsgroup did not require 
registration. So the problem of fragmentation was reduced (copies of the 
message made it to all groups involved usually).



It won't happen again I promise :-) . It is the damn reply all  button 
that does all the ugly demonic things these days.


:D



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Jason Pruim


On Sep 30, 2008, at 2:41 PM, Thiago H. Pojda wrote:



On Tue, Sep 30, 2008 at 3:12 PM, Daniel Brown [EMAIL PROTECTED]  
wrote:



  All:

  What was pointed as a passing mention in one thread I thought was
worth note in a thread of its own.  As quoted by Rob:

BTW, while we're off topic... my wife delivered our third child  
(second

boy) 3 minutes after midnight yesterday :)


  I'd say that deserves a round of congratulations.  Many - most,
probably - of you know Rob from here, and have seen his help and
dedication - as well as his annoying wit ;-P - offered to any and  
all

on this list.  Quite often, it's offered when you don't especially
want it.  Nonetheless, it's great news, and I think we should all  
take
a moment and wonder: why the hell aren't you at the hospital with  
your

wife and newborn son, Rob?  ;-P

  Congrats to the Cummings family!




That's great news - perhaps now he won't have much time for emails ;)

Congratulations!!


He's going to lease time on the AI Bots that various people are  
writing! ;)


Congrats Rob! And good luck with all those little cummings running  
around! (I'm sure there is a pun there but I'm tired and hungry :P)



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] db_* = pg_*/my_*/ifx_* ?

2008-09-30 Thread Ashley Sheridan
On Sat, 2008-09-27 at 18:31 +0200, Michelle Konzack wrote:
 Hello,
 
 I am using some crapy software,  which  does  not  allow  switching  the
 Database, where I use PostgreSQL since 1999  and  those  crapy  software
 force me to install mysql, sqlite and  other  databases  which  let  the
 administration, maintenance AND COSTS explode...
 
 My own tools are generaly build for PostgreSQL but very adaptive,  since
 I use and include (e.g.:  db_pgsql.inc) with the neccesary  functions.
 
 This mean, I can create a db_mysql.inc and change the include  path  and
 all is working as expected.
 
 Now my question is:
 
 Is there a tool which support such thing already or
 do I have to do this crap for each software I code?
 
 Thanks, Greetings and nice Day/Evening
 Michelle Konzack
 Systemadministrator
 24V Electronic Engineer
 Tamay Dogan Network
 Debian GNU/Linux Consultant
 
 
Hi Michelle, I'm not sure exactly what it is you're after. Are you
looking for software that will allow you to develop applications that
are database agnostic?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Robert Cummings

2008-09-30 Thread Colin Guthrie

Daniel Brown wrote:

All:

What was pointed as a passing mention in one thread I thought was
worth note in a thread of its own.  As quoted by Rob:


BTW, while we're off topic... my wife delivered our third child (second
boy) 3 minutes after midnight yesterday :)


Ahh indeed. Congrats to you and yours Rob. I missed that little 
snippet... :)


Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Ashley Sheridan
On Tue, 2008-09-30 at 13:25 -0400, tedd wrote:
 At 7:49 AM -0700 9/30/08, Jim Lucas wrote:
 Why do you think they are looking for a programmer...
 
 Because they ran out of people who can really screw things up.
 
 Cheers,
 
 tedd
 
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
No, you got it all wrong. It's management that screws stuff up,
developers and engineers fix their mistakes afterwards!


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Afan Pasalic
Daniel Brown wrote:
 All:

 What was pointed as a passing mention in one thread I thought was
 worth note in a thread of its own.  As quoted by Rob:

   
 BTW, while we're off topic... my wife delivered our third child (second
 boy) 3 minutes after midnight yesterday :)
 

 I'd say that deserves a round of congratulations.  Many - most,
 probably - of you know Rob from here, and have seen his help and
 dedication - as well as his annoying wit ;-P - offered to any and all
 on this list.  Quite often, it's offered when you don't especially
 want it.  Nonetheless, it's great news, and I think we should all take
 a moment and wonder: why the hell aren't you at the hospital with your
 wife and newborn son, Rob?  ;-P

 Congrats to the Cummings family!

Best wishes to whole Cummings family! Keep well, healthy and lot of fun!

-afan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Richard Heyes
 You can call [it] Susan if it makes you happy. - Snatch

 Sorry, I had to!

Sorry, not seen (the film?) Snatch.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Ashley Sheridan
On Tue, 2008-09-30 at 20:09 +0100, Richard Heyes wrote:
  You can call [it] Susan if it makes you happy. - Snatch
 
  Sorry, I had to!
 
 Sorry, not seen (the film?) Snatch.
 
I really recommend it. It's one of Guy Ritchies films before Madonna got
involved and started messing his films up for him!


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Stut

On 30 Sep 2008, at 19:12, Daniel Brown wrote:

   What was pointed as a passing mention in one thread I thought was
worth note in a thread of its own.  As quoted by Rob:

BTW, while we're off topic... my wife delivered our third child  
(second

boy) 3 minutes after midnight yesterday :)


   I'd say that deserves a round of congratulations.  Many - most,
probably - of you know Rob from here, and have seen his help and
dedication - as well as his annoying wit ;-P - offered to any and all
on this list.  Quite often, it's offered when you don't especially
want it.  Nonetheless, it's great news, and I think we should all take
a moment and wonder: why the hell aren't you at the hospital with your
wife and newborn son, Rob?  ;-P

   Congrats to the Cummings family!


I'm sure there's a joke here involving surnames but I'm gonna resist  
trying to find it.


Congratulations Rob and family.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name of graph

2008-09-30 Thread Ashley Sheridan
On Tue, 2008-09-30 at 09:53 +0100, Richard Heyes wrote:
 Hi,
 
 Anyone know what the line in the first bar chart is called? I call it
 a summary line, but that's wrong. ISTR it being referred to
 something that involved the word frequency, but I may be off my
 trolley...
 
 You'll need a browser other then MSIE to see them. Thanks.
 
 -- 
 Richard Heyes
 
 HTML5 Graphing for FF, Chrome, Opera and Safari:
 http://www.phpguru.org/RGraph
 
You can call [it] Susan if it makes you happy. - Snatch

Sorry, I had to!


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for the sake of conversation - syntax

2008-09-30 Thread Stut

On 30 Sep 2008, at 17:40, Nathan Rixham wrote:

Stut wrote:

Consider this...
file1.php:
package arse
{
   class bandit
   {
   ...
   }
}
package nipple
{
   class clamp
   {
   ...
   }
}
file2.php:
import file1 as chest;
Which package have I aliased as chest in file2.php?
This could be solved using import file1 into chest which  
presumably would then give me chest::arse::bandit and  
chest::nipple::clamp but that's pretty nasty.


see I'd lock it to one class per file; multiple files/classes per  
package :) I think one should always keep their arse and nipple  
seperate.


consider:

file: /classes/net/stut/body/arse.php
package net.stut.body.arse
{
   class bandit
   {
   ...
   }
}

file: /classes/net/stut/body/nipple.php
package net.stut.body.nipple
{
   class clamp
   {
   ...
   }
}

file: /classes/net/stut/body/chest.php
package /classes/net/stut/body/chest
{
   import net.stut.body.nipple;
   class chest
   {
   ...
   }
}

or

file: /classes/net/stut/body/chest.php
import net.stut.body.nipple;
$u = new arse::bandit;

whhiihhh leads me back to my earlier q of  
how would this new style work when doing things the procedural way..  
even the above three lines; any potential problems there?


Sorry, I must have missed this question. Since namespaces are  
effectively another level or organisation above classes there's really  
no issue at all with only having in them, at least conceptually. In  
fact I'd guess you'd be implementing limitations where no limitation  
is necessary if you were to limit namespace contents to classes. I  
would hope the current PHP implementation does not have this  
limitation but I've not had much time to play with it yet.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread Stut

On 30 Sep 2008, at 18:23, tedd wrote:

At 4:27 PM +0100 9/30/08, Stut wrote:

As examples check out the following pages (under the orange bar)...

http://uk.freeads.net/


Stut:

I can understand:

Travel  Holidays

Because the user moves to the Holidays page from the Travel  
page. In fact, there's no way to get to the Holidays page other  
than from Travel page and thus a good reason for leaving a bread  
crumb trail.


But what's the point of having UK  Motors? Aren't they on the same  
level?


It's likewise with your other examples.

What's the rational behind showing two bread crumbs when one will do?


One won't do, they're very different. The UK breadcrumb links to  
uk.freeads.net and the Motors crumb links to motors.uk.freeads.net -  
two very different pages. In addition to that, UK is the level above  
regionalised sites like aberdeen.uk.freeads.net.


The UK breadcrumb is the equivalent of what most sites would call  
Home. We don't call it that because Home on the Aberdeen site is one  
level below the UK crumb.


Hope that makes sense.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread mike
Also remember there are two styles of breadcrumbs: those which follow  
you around the site and create a path of your previous pages (like a  
true breadcrumb) or the more standard path-back-to-home hierarchial  
style. It doesnt make much sense to recreate the browsers back button  
functionality anyway.


On Sep 30, 2008, at 12:48 PM, Stut [EMAIL PROTECTED] wrote:


On 30 Sep 2008, at 18:23, tedd wrote:

At 4:27 PM +0100 9/30/08, Stut wrote:

As examples check out the following pages (under the orange bar)...

http://uk.freeads.net/


Stut:

I can understand:

Travel  Holidays

Because the user moves to the Holidays page from the Travel  
page. In fact, there's no way to get to the Holidays page other  
than from Travel page and thus a good reason for leaving a bread  
crumb trail.


But what's the point of having UK  Motors? Aren't they on the  
same level?


It's likewise with your other examples.

What's the rational behind showing two bread crumbs when one will do?


One won't do, they're very different. The UK breadcrumb links to  
uk.freeads.net and the Motors crumb links to motors.uk.freeads.net -  
two very different pages. In addition to that, UK is the level above  
regionalised sites like aberdeen.uk.freeads.net.


The UK breadcrumb is the equivalent of what most sites would call  
Home. We don't call it that because Home on the Aberdeen site is one  
level below the UK crumb.


Hope that makes sense.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread Eric Butera
On Tue, Sep 30, 2008 at 3:54 PM, mike [EMAIL PROTECTED] wrote:
 Also remember there are two styles of breadcrumbs: those which follow you
 around the site and create a path of your previous pages (like a true
 breadcrumb) or the more standard path-back-to-home hierarchial style. It
 doesnt make much sense to recreate the browsers back button functionality
 anyway.

Don't forget people share links and find sites through lots of random
ways.  It's nice to have such things.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Eric Butera
Congrats!  Hope you saved up on your sleep. :D

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] navigation / location bar

2008-09-30 Thread mike
On Tue, Sep 30, 2008 at 1:07 PM, Eric Butera [EMAIL PROTECTED] wrote:

 Don't forget people share links and find sites through lots of random
 ways.  It's nice to have such things.

Oh yes, I am moreso for the back to home style myself. A deep link
won't benefit from the this is how you got here anyway.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread Jochem Maas
Daniel Brown schreef:
 All:
 
 What was pointed as a passing mention in one thread I thought was
 worth note in a thread of its own.  As quoted by Rob:
 
 BTW, while we're off topic... my wife delivered our third child (second
 boy) 3 minutes after midnight yesterday :)
 
 I'd say that deserves a round of congratulations.  Many - most,
 probably - of you know Rob from here, and have seen his help and
 dedication - as well as his annoying wit ;-P - offered to any and all
 on this list.  Quite often, it's offered when you don't especially
 want it.  Nonetheless, it's great news, and I think we should all take
 a moment and wonder: why the hell aren't you at the hospital with your
 wife and newborn son, Rob?  ;-P
 
 Congrats to the Cummings family!
 

I second that, best wishes to Rob's family.

I figure I'd pass on a rubber doll joke, that would just be disrespectful
to Rob's wife ... and she has to put up with him alot more than we do ;-)

seriously though, congrats to you and your wife, hope all is well.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread tedd

At 2:12 PM -0400 9/30/08, Daniel Brown wrote:

All:

What was pointed as a passing mention in one thread I thought was
worth note in a thread of its own.  As quoted by Rob:


 BTW, while we're off topic... my wife delivered our third child (second

  boy) 3 minutes after midnight yesterday :)



Hey, things like that happen when Rob wanders from his blow-up doll.  :-)

Congratulations Rob and family.

Imagine, another Rob-ett

Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Robert Cummings

2008-09-30 Thread tedd

At 11:14 PM +0200 9/30/08, Jochem Maas wrote:

I figure I'd pass on a rubber doll joke, that would just be disrespectful
to Rob's wife ... and she has to put up with him alot more than we do ;-)



Oopps, I just sent mine.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sepating MySQL result set into html tables

2008-09-30 Thread tedd

At 8:46 PM +0300 9/30/08, Thodoris wrote:

At 8:32 PM +0300 9/26/08, Thodoris wrote:


Yes it will but I will make this better along with other things as 
long as I find the needed algorithm.


--
Thodoris


http://webbytedd.com/bbb/paging/

The code is there.

Cheers,

tedd



Thanks Tedd this does the paging but it wasn't what I asked on the 
first place. Check on the rest postings on the thread...


--
Thodoris


Thodoris:

I thought that you were asking for not only paging, but how to get 
data from a mysql dB in steps for presentation -- is that not correct?


If so, then look at the code.

Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread tedd

At 1:44 PM -0400 9/30/08, Daniel Brown wrote:

On Tue, Sep 30, 2008 at 1:34 PM, tedd [EMAIL PROTECTED] wrote:

 At 9:51 AM -0700 9/30/08, VamVan wrote:


 Job Description is awesome though. My first instinct was to jump in to it
 right away. But there are some red flags as their website looks too
 immature. Hard to believe !!!


 That's my instinct as well.

 If a company is advertising for web programmers and doesn't have it's own
 web site in order, then I suspect there is a disconnect between management
 and their technical staff (if they have any). If they won't listen to their
 own people, or they don't know any better, then I don't want to work for
 them.


That's not always the case though.  It's not in my case, for
example.  My company's website isn't up and running, but I'm able to
keep my staff busy and paid every day.

Then again, I don't publicly-advertise job openings yet.  So
it doesn't apply to my situation exactly but just something worth
noting.



I might have been a bit flippant in my remark -- but I have had too 
many clients who think the web is print and that's a big mistake. If 
they don't realize that the net is a different critter, then everyone 
loses.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   >