[PHP] Reading the documentation

2004-08-21 Thread Octavian Rasnita
Hi all, I have 2 questions: 1. Do PHP libraries have a documentation included inside of them like in case of Perl's modules? 2. If yes, how can I read that documentation? Thank you. Teddy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: for loops performance

2004-08-21 Thread Aidan Lister
Hi Tadas, PHP5 has very optimised code for loops, try upgrading and tell us how it goes! Also, if it's applicable, a plain "foreach" loop is actually faster. Kind Regards, Aidan "Xongoo!Com: Central Unit" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Holla, > > Maybe someone kn

Re: [PHP] for loops performance

2004-08-21 Thread John Holmes
Xongoo!com: Central unit wrote: Maybe someone knows how to improve for loops performance? When generating 1000's of pages, it oads in 10-20 seconds. Maybe there is some solution I don't know about? If you only generate 100s of pages, it'll probably load about ten times faster... -- ---John Holmes

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Daniel Schierbeck
Robert Cummings wrote: On Sat, 2004-08-21 at 14:38, Daniel Schierbeck wrote: Robert Cummings wrote: In PHP5 to get a copy of, versus a reference to, an object the developer must call the __clone() method for the target object: $obj = new Foo(); $copyNotReference = $obj->__clone(); The correct

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Robert Cummings
On Sat, 2004-08-21 at 14:38, Daniel Schierbeck wrote: > Robert Cummings wrote: > > In PHP5 to get a copy of, versus a reference to, an object the developer > > must call the __clone() method for the target object: > > > > $obj = new Foo(); > > $copyNotReference = $obj->__clone(); > > The

Re: [PHP] Re: replace value of array by key of array in string variable with pre

2004-08-21 Thread Justin Patrin
On Sat, 21 Aug 2004 12:54:15 -0500, Shawn McKenzie <[EMAIL PROTECTED]> wrote: > Turbo wrote: > > Hi, > > > > I have array variable and string variable. > > I want to replace value of array by key of array in string variable > > with preg_replace(). > > > > Example : > > $message=array( > > 'name'=

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Daniel Schierbeck
Robert Cummings wrote: In PHP5 to get a copy of, versus a reference to, an object the developer must call the __clone() method for the target object: $obj = new Foo(); $copyNotReference = $obj->__clone(); The correct syntax for that is: $obj = new Foo; $copyNotReference = cl

Re: [PHP] for loops performance

2004-08-21 Thread Shawn McKenzie
Xongoo!Com: Central Unit wrote: Here's: for ($c=1; $c<$numpages; $c++){ echo "$c | "; } When it generates 1-10, it is normal 0.05 s, but often I need more than 1000, so when generating 100's - it is 0.5-1.5 sec., when more than 1000 - 10+ s. I am thinking on running sopme sort of: 1) generate code

[PHP] Re: replace value of array by key of array in string variable with pre

2004-08-21 Thread Shawn McKenzie
Turbo wrote: Hi, I have array variable and string variable. I want to replace value of array by key of array in string variable with preg_replace(). Example : $message=array( 'name'=>'My Computer', 'version'=>'1.0' ); $strValue="I am $name,build version $version\n"; How's to replace? Yingyos Why

Re: [PHP] for loops performance

2004-08-21 Thread Xongoo!com: Central unit
Here's: for ($c=1; $c<$numpages; $c++){ echo "$c | "; } When it generates 1-10, it is normal 0.05 s, but often I need more than 1000, so when generating 100's - it is 0.5-1.5 sec., when more than 1000 - > 10+ s. I am thinking on running sopme sort of: 1) generate code of number of pages once a d

Re: [PHP] for loops performance

2004-08-21 Thread raditha dissanayake
Xongoo!com: Central unit wrote: Holla, Maybe someone knows how to improve for loops performance? When generating 1000's of pages, it oads in 10-20 seconds. Maybe there is some solution I don't know about? prey what is your algorithm? Thanks! -- Tadas Talaikis [EMAIL PROTECTED] http://www.xongoo.

Re: [PHP] for loops performance

2004-08-21 Thread Robert Cummings
On Sat, 2004-08-21 at 12:17, Xongoo!com: Central unit wrote: > Holla, > > Maybe someone knows how to improve for loops > performance? When generating 1000's of pages, it > oads in 10-20 seconds. Maybe there is some > solution I don't know about? Give us an example of your for loop that is having

[PHP] for loops performance

2004-08-21 Thread Xongoo!com: Central unit
Holla, Maybe someone knows how to improve for loops performance? When generating 1000's of pages, it oads in 10-20 seconds. Maybe there is some solution I don't know about? Thanks! -- Tadas Talaikis [EMAIL PROTECTED] http://www.xongoo.com -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Robert Cummings
On Sat, 2004-08-21 at 11:21, Curt Zirzow wrote: > * Thus wrote Robert Cummings: > > > > As exemplified in the sample script I sent in my last response and by > > the link sent by Hannes Magnusson, in PHP5 the following have identical > > behaviour: > > > > $o1 = new Foo(); > > $o2 = $o1;

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Curt Zirzow
* Thus wrote Robert Cummings: > > As exemplified in the sample script I sent in my last response and by > the link sent by Hannes Magnusson, in PHP5 the following have identical > behaviour: > > $o1 = new Foo(); > $o2 = $o1; > > // Is same as... > > $o1 = new Foo(); > $o2 =&

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Robert Cummings
On Sat, 2004-08-21 at 10:24, Curt Zirzow wrote: > * Thus wrote Robert Cummings: > > On Sat, 2004-08-21 at 00:10, Curt Zirzow wrote: > > > * Thus wrote Robert Cummings: > > > > Hi All, > > > > > > > > I think I'm looking for something that doesn't exist, but just in > > > > case thought I'd che

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Curt Zirzow
* Thus wrote Robert Cummings: > On Sat, 2004-08-21 at 00:10, Curt Zirzow wrote: > > * Thus wrote Robert Cummings: > > > Hi All, > > > > > > I think I'm looking for something that doesn't exist, but just in > > > case thought I'd check the list. Does anyone know if a PHP function > > > exists t

Re: [PHP] Re: PHP, over javascript code simple \n

2004-08-21 Thread Louie Miranda
single ' will work fine. :) not double " On Fri, 20 Aug 2004 11:49:10 +0200, aRZed <[EMAIL PROTECTED]> wrote: > > > > print(" > > if (document.rpcjs_louie.ColCustName.value == \"\") { walangfield += > > \"Missing: Firstname\n\"; } > > "); > > ?> > > try simply escaping the "\" before the "n" wi

[PHP] Replacing variables

2004-08-21 Thread Watty
I have a HTML form class which declares a format array on construction, which contains the format of the form per line. Then it creates an array which defines the input boxes styles of a form. I need a method of arbitrarily adding each of the input boxes into the format array on output. Could anyon

Re: [PHP] Get reference count on a variable.

2004-08-21 Thread Hannes Magnusson
On Sat, 21 Aug 2004 04:10:53 + [EMAIL PROTECTED] (Curt Zirzow) wrote: > * Thus wrote Robert Cummings: > > Hi All, > > > > I think I'm looking for something that doesn't exist, but just in > > case thought I'd check the list. Does anyone know if a PHP function > > exists to get the number

[PHP] mysqli_escape_string vs. mysqli_prepare

2004-08-21 Thread aRZed
Hy! I have a relative simple question about mysqli_prepare: When I prepare a statement and then bind parameters to it, does php automatically care for escaping strings etc.? Example: prepare("SELECT FROM table WHERE x=?"); $p = "5'" $stmt->bind_param("i",$p); # is "5'" converted to 5 lik

Re: [PHP] avi to wmv convert

2004-08-21 Thread Peter Clarke
John Nichel wrote: Peter Clarke wrote: John Nichel wrote: Jay Blanchard wrote: [snip] In what manual? [/snip] TFM! I'm sorry, I didn't quite catch that. Could you hold my hand, and point it out to me? If you were a real pal, you would write the code for me too. ;) The only manual I know of is