Re: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Aric Caley
Marek Kilimajer wrote: But workaround would be to call your function with array(): Thanks, I was afraid that might be the only way. I guess its possible if you write an extension (like mysqli) in C? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

[PHP] include/require inside of function

2003-07-04 Thread Aric Caley
Is there anyway to include a file inside of a function and have the included stuff be global? For instance if I defined a class or a function in that include file, I want to be able to use that class outside of the function. On the documentation for include() a poster commented that it did indeed

Re: [PHP] q: extract() and get_defined_vars()

2003-06-27 Thread Aric Caley
>Yes it is, you must tell the function to treat the relevant variables as >globals though, here is a way of doing it: >function Foo(){ >$theArray = array('var1'=>'testing', 'var2'=>'testing2'); >foreach($theArray as $varname=>$value){ >global $$varname; >} >extract($theArra

[PHP] q: extract() and get_defined_vars()

2003-06-27 Thread Aric Caley
am I assuming correctly that get_defined_vars() returns an array pretty much like the $GLOBALS array? If I call extract() inside of a function, then the variables it creates will be local to that function, correct? OK, so, is there a way to get extract() to define those variables as global, from

Re: [PHP] variable scoping...

2002-04-13 Thread Aric Caley
fted as of PHP > version 4.0.6. > > (cc'ing phpdoc to fix) > > -Rasmus > > On Fri, 12 Apr 2002, Aric Caley wrote: > > > but the virtual() documentation says you can't use it on a php script? > > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote

Re: [PHP] variable scoping...

2002-04-12 Thread Aric Caley
ky as well, but it isn't quite as bad as going through CGI or all the > way out to the port 80 level. > > -Rasmus > > On Fri, 12 Apr 2002, Aric Caley wrote: > > > Is it possible to keep the variable name-space separate between, say, two > > files (one included into

[PHP] Re: variable scoping...

2002-04-12 Thread Aric Caley
hat in which way, when they have > the same > name. not very good imo. > > "Aric Caley" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Is it possible to keep the variable name-space separate between, say,

[PHP] variable scoping...

2002-04-12 Thread Aric Caley
Is it possible to keep the variable name-space separate between, say, two files (one included into the other) to avoid name collisions? I'm trying to get two scripts to work together on the same page. Each script defines some classes that have the same names but work differently (ex., class Temp

[PHP] objects in sessions.

2002-02-27 Thread Aric Caley
If you register an object as a session variable, do you need to include the objects class *before* start_session()? What if I use serialize() on my object, and then register a variable with the serialized data; then I can start_session(), do some other things, then include the class definition, t

[PHP] Re: Seams not to be possible

2002-02-07 Thread Aric Caley
maybe you could use eval(): eval("echo \$" . $field"); - Original Message - From: "Andy" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 2:57 AM Subject: Seams not to be possible > This was just an error in my explenation I ment cate

Re: [PHP] curious - any phpshop/core users?

2002-01-31 Thread Aric Caley
I've used PHPShop (the existing version, not the new core/commerce thing) to do one site. It's relatively easy to set up. I've had to do some modifications to it (namely, to make it use Payflow link, which works via HTTP requests; and adding dropdown menus on products to select color & airtime r

[PHP] Could somebody PLEASE explain this one to me

2002-01-29 Thread Aric Caley
Why, oh WHY doesnt this work. I get the error: Fatal error: Call to a member function on a non-object in c:\home\digerati\www\classtest.php3 on line 23 If I try to make any assignments, anywhere, it dies. What the HELL is going on? Obviously I must be missing something really obvious, I

[PHP] session id's and url rewriting.

2002-01-28 Thread Aric Caley
Is there any way to access the PHP4 session URL rewriter directly? Is there a way to override it and use a different function (say you wanted to make a rewriter for XML or something other than HTML)? Could anybody point me to a function that does what the rewriter does? Surely somebody's written