2012/12/6 Pierre du Plessis
> Hi all
>
> I searched the internet (probably not hard enough), and couldn't find a
> decent answer.
>
> I was wondering why, when calling unset on an object, it doesn't
> automatically call the __destruct method (if it exists) on the object.
>
Thats because it was n
Hi all
I searched the internet (probably not hard enough), and couldn't find a
decent answer.
I was wondering why, when calling unset on an object, it doesn't
automatically call the __destruct method (if it exists) on the object.
When unsetting an object, php doesn't automatically remove referen
Ashley Sheridan wrote:
That would seem sensible to me though really. A constructor only bears
true for the base class, so any classes which inherit it must
incorporate all the constructor parts. A destructor doesn't know about
further classes which will need to inherit it, so it shouldn't be
inh
is it the case that unset() does not trigger an error or throw an exception
if it's argument was never set?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
i test your codes again,it is work correctly!
But for backends compatibly with older php versions my codes is better
:),i'm sorry for my mistake at moment.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stuart, u are right, the refcount in php 5 doesn't matter, where something
left behind in my memory from earlier days, However i do have the effect
that unsetting an object does NOT call __dectruct() ! but when the script
ends it is called. this can be easily tested by putting a echo in destruct.
I dont agree, and as u see in my snipped code it works fine.
in an abstract class u can define an implementation to define some basic
things a overwriting function in an extending class has to take care of as
well.
this includes specialy magic functions.
thats what they are made for. may be you
see http://cn.php.net/manual/en/language.oop5.abstract.php
PHP 5 introduces abstract classes and methods. It is not allowed to
create an instance of a class that has been defined as abstract. Any
class that contains at least one abstract method must also be
abstract. Methods defined as abstract sim
2009/8/24 Ralph Deffke :
> this is also not the full truth try this and it works
> what are the circumstances that is causing this problem then, yes I do have
> distributed references over my script and there are clearly references still
> set, however after running the snipped script I can not see
this is also not the full truth try this and it works
what are the circumstances that is causing this problem then, yes I do have
distributed references over my script and there are clearly references still
set, however after running the snipped script I can not see what I do
special in my script c
2009/8/24 Ralph Deffke
> typing error sorry
>
> forget my last post
>
> is there a was to destroy an object if there is hold a reference somewhere?
>
> "Stuart" wrote in message
> news:a5f019de0908240606x5fdca70bkb31dd32b072e5...@mail.gmail.com...
> > 2009/8/24 kranthi :
> > > unset($obj) always
typing error sorry
forget my last post
is there a was to destroy an object if there is hold a reference somewhere?
"Stuart" wrote in message
news:a5f019de0908240606x5fdca70bkb31dd32b072e5...@mail.gmail.com...
> 2009/8/24 kranthi :
> > unset($obj) always calls the __destruct() function of the cl
On Mon, 2009-08-24 at 15:13 +0200, Ralph Deffke wrote:
> that is correct and that is the problem, and even that is not all !!!
>
> try this
>
>
> abstract class a {
> public function __construct(){
> echo "constructing";
> }
> public function __detruct(){
> echo "destructing..
that is correct and that is the problem, and even that is not all !!!
try this
";
}
public function __detruct(){
echo "destructing";
}
}
class b extends a{
}
$c = new b();
unset( $c );
?>
the constructor is inherited, the destructor not !!
PHP 5.2.9-1 and
PHP 5.3.0 behave the sam
kranthi wrote:
unset($obj) always calls the __destruct() function of the class.
Never calls the dtor. The dtor will be called only when the reference
count reaches 0.
class c { function __destruct() { echo 'dying !' ; } }
$v1 = new c ;
$v2 = $v1 ;
unset($v1) ; // don't call the dtor
unset
2009/8/24 kranthi :
> unset($obj) always calls the __destruct() function of the class.
>
> in your case clearly you are missing something else. Probably
> unset($anobject) is not being called at all ?
That's not entirely correct. PHP uses reference counting, so if
unsetting a variable did not caus
unset($obj) always calls the __destruct() function of the class.
in your case clearly you are missing something else. Probably
unset($anobject) is not being called at all ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
but it should? shouldn't it how can I destroy a class instance invocing
__detruct() of the class ?!?!?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Why $_GET['i'] doesn't unsets ?
Your page URL has ?i=asdf in it. As such, $_GET['i'] is being set every time you refresh
that particular URL. Unsetting $_GET['i'] will only erase the variable for that instance
of that PHP script. As soon as you refresh, you are calling a new instance of that
>
> Dan Shirah a écrit :
>
>> How about just adding a simple counter on your page.
>>
>>
> That's what I do but that "counter" resets when you press F5 and is not
> functionnal.
>
> Why $_GET['i'] doesn't unsets ?
Are you saving the array to a database once it is created? If not, wouldn't
the a
The $_GET array comes from the URL which is resent every time someone
hits F5. unset works on the server, not on the browser. You could
capture it, add it to the session and then redirect without it in the URL.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
> -Original Message-
> From: Bill [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 04, 2008 3:23 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] unset($_GET['i'])
>
> Dan Shirah a écrit :
> > How about just adding a simple counter on you
Bill <[EMAIL PROTECTED]> wrote:
> Dan Shirah a écrit :
> > How about just adding a simple counter on your page.
> >
>
> That's what I do but that "counter" resets when you press F5 and is not
> functionnal.
>
> Why $_GET['i'] doesn't unsets ?
Because you get a new i from the URL, hence
Dan Shirah a écrit :
How about just adding a simple counter on your page.
That's what I do but that "counter" resets when you press F5 and is not
functionnal.
Why $_GET['i'] doesn't unsets ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.p
>
> Hi
>
> given page1 has a list of goods and sends $i as a variable into a link to
> page2, ie, send
>
> Page2 adds the items recieved in an array.
>
> In page2 how can I unset the $_GET['i'] so that if I press F5(refresh) it
> doesn't add the same item to the array ?
>
> I tried unset($_GET['i']
Hi
given page1 has a list of goods and sends $i as a variable into a link
to page2, ie, send
Page2 adds the items recieved in an array.
In page2 how can I unset the $_GET['i'] so that if I press F5(refresh)
it doesn't add the same item to the array ?
I tried unset($_GET['i']) but no succes
Jim,
Read the first emails, your idea was my initial design, eg.
$sorted= array();
recrusion($array, &$sorted);
var_dump( $sorted );
It's not a "nice" solution due to a need to create variable before the call.
Using my final function it will return sorted array into new variable eg
$sorted = recu
David Sky wrote:
Hey,
Can't use your example, as you check weather
$sorted is empty, if it is -> run the foreach and return,
but on next recursion when it's not empty - do nothing :)
Though I found how to cut a few seconds (on very big array),
removing the first if, and adding a $return=true to
That's true. My fault. I forgot the recrusion call ;-)
I think that is the better solution so far, and it is far far away (better)
that the one you posted at first
On 01/07/2008, David Sky <[EMAIL PROTECTED]> wrote:
>
> Hey,
>
> Can't use your example, as you check weather
> $sorted is empty, if
Hey,
Can't use your example, as you check weather
$sorted is empty, if it is -> run the foreach and return,
but on next recursion when it's not empty - do nothing :)
Though I found how to cut a few seconds (on very big array),
removing the first if, and adding a $return=true to functions'
paramet
Hi David,
That's good work ;-)
You are right that my example would only return one entry for each parent.
Didn't realized of that.
I know the local copies you create in the recursive calls is not the best
solution in efficiency, but lots of times it is better to have local copies
of the array (i
Hey Robero,
Thanks for the answer, the none recursion function is a good idea,
although as provided in your example if would only return one
entry from each parent it can get to and it only can get to few,
depends on how the array is sorted.
Basically you can make it work if you would sort the ar
That's not the problem. Look that the function is called with &$return, so
there is a reference to the variable in which the function returns the value
(if not there would not be an answer...).
Otherwise, i think the problem is in the recursive call inside the function.
Once you make the unset, yo
On Sun, 2008-06-29 at 18:25 -0800, David Sky wrote:
> Hello everyone!
>
> A couple of days ago I submitted a bug to PHP
> http://bugs.php.net/bug.php?id=45385
> But I was mistaken, apparently it's not a bug.
> And I was "sent" here to get help.
I think you might be forgetting to return $return.
]
Sent: Monday, June 30, 2008 12:09 PM
To: php-general@lists.php.net
Subject: Re: [PHP] unset in foreach breaks recrusion
David Sky wrote:
> Hello everyone!
>
> A couple of days ago I submitted a bug to PHP
> http://bugs.php.net/bug.php?id=45385
> But I was mistaken, apparently
David Sky wrote:
> Hello everyone!
>
> A couple of days ago I submitted a bug to PHP
> http://bugs.php.net/bug.php?id=45385
> But I was mistaken, apparently it's not a bug.
> And I was "sent" here to get help.
> [snip]
> So before I write a reply to the bug i submitted, I wanted to know
> if ther
Hello everyone!
A couple of days ago I submitted a bug to PHP
http://bugs.php.net/bug.php?id=45385
But I was mistaken, apparently it's not a bug.
And I was "sent" here to get help.
Although I did tried what was suggested in the response,
Actually I tried it before I wrote about the bug, as I foun
Abu Warez wrote:
> --- On Fri, 6/27/08, Thijs Lensselink <[EMAIL PROTECTED]> wrote:
>
>> From: Thijs Lensselink <[EMAIL PROTECTED]>
>> Subject: Re: [PHP] unset and circular references
>> To: php-general@lists.php.net
>> Date: Friday, June 27, 2008, 5:21
--- On Fri, 6/27/08, Thijs Lensselink <[EMAIL PROTECTED]> wrote:
> From: Thijs Lensselink <[EMAIL PROTECTED]>
> Subject: Re: [PHP] unset and circular references
> To: php-general@lists.php.net
> Date: Friday, June 27, 2008, 5:21 PM
> Quoting Abu Warez <[EMAIL PR
--- On Fri, 6/27/08, Thijs Lensselink <[EMAIL PROTECTED]> wrote:
> From: Thijs Lensselink <[EMAIL PROTECTED]>
> Subject: Re: [PHP] unset and circular references
> To: php-general@lists.php.net
> Date: Friday, June 27, 2008, 5:21 PM
> Quoting Abu Warez <
Quoting Abu Warez <[EMAIL PROTECTED]>:
Hi,
I'm using php 5.2.1 on an Ubuntu machine.
I have the following class diagram (observer pattern):
+-+ +-+ +-+
| class A |<#>->| class B |< >->| interface C |
| | +
Hi,
I'm using php 5.2.1 on an Ubuntu machine.
I have the following class diagram (observer pattern):
+-+ +-+ +-+
| class A |<#>->| class B |< >->| interface C |
| | +-+ | |
|
what do we think of:
while(1) {
#script here to do stuff
unset( array_keys(get_defined_vars()) );
sleep(10);
}
thoughts anybody, or a better way of keeping memory usage down on other
peoples scripts that I don't have time to fumble about cleaning
Regards
Nath
--
PHP General Mailing List
Rob,
Thanks for the detailed explanation about the reference assignments that
are happening in the background. Now things start to make sense :-)
Regards,
Robert
Robert Cummings wrote:
On Mon, 2007-04-23 at 14:04 +0300, Robert Enyedi wrote:
I'm doing some experimenting with the unset() (http
ssage -
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Robert Enyedi" <[EMAIL PROTECTED]>
Cc:
Sent: Monday, April 23, 2007 3:05 PM
Subject: Re: [PHP] unset() side effects in functions
On Mon, 2007-04-23 at 14:04 +0300, Robert Enyedi wrote:
I'm doing
On Mon, 2007-04-23 at 14:04 +0300, Robert Enyedi wrote:
> I'm doing some experimenting with the unset() (http://php.net/unset)
> language construct in a PHP 5.2.1 installation. I did not find any
> documentation on what happens to an identically named local variable's
> value after an unset is p
I'm doing some experimenting with the unset() (http://php.net/unset)
language construct in a PHP 5.2.1 installation. I did not find any
documentation on what happens to an identically named local variable's
value after an unset is performed.
Let me start with this example:
in function (init):
Hello All,
I've been struggling with a rather obscure PHP memory issue for the
last few days. Here's my setup:
FreeBSD 5.5
Apache2.0, PHP 5.1.6, and MySQL 4.1.x compiled from scratch (that is,
we're not using FreeBSD ports)
PHP is compiled with --enable-memory-limit and the limit is set to 8MB
There is no way using the core language. You can, however, use the
runkit function if you absolutely have to:
http://php.net/runkit_constant_remove
Jasper
Suhas wrote:
Hi,
How do I unset a defined variable.
e.g.
define('AA',1);
unset(AA) // gives error
any suggestions!
Thanks
SP
--
P
Suhas wrote:
Hi,
How do I unset a defined variable.
You can't.
What do you want to do that for?
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
How do I unset a defined variable.
e.g.
define('AA',1);
unset(AA) // gives error
any suggestions!
Thanks
SP
http://in.php.net/unset
On 12/12/05, Eternity Records Webmaster <[EMAIL PROTECTED]> wrote:
> I use php 5.0.5 and was wondering when I use $_SESSION would unset() work
> the best for getting rid of the values in that array??
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, v
I use php 5.0.5 and was wondering when I use $_SESSION would unset() work
the best for getting rid of the values in that array??
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 28 July 2004 20:17, Daevid Vincent wrote:
> No. I'm trying to delete it from PHP memory, but keep the cookie on
> their client in the cookie.txt file or wherever it's stored.
Where are you doing the test for it -- in the same script, or in a
subsequent one? If the former, then I'm confused; i
> No. I'm trying to delete it from PHP memory, but keep the cookie on their
> client in the cookie.txt file or wherever it's stored.
>
> The idea is for added security. I just don't want traces of it around after
> the initial login.
I am not sure about deleting a superglobal, but even if you do
ilto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 12:03 PM
> To: Daevid Vincent
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] unset($_COOKIE['foo']) and $_COOKIE['foo']
> = '' both don't do anything.
>
> > unset($_COOKIE['foo
> unset($_COOKIE['foo']);
>
> And also
>
> $_COOKIE['foo'] = '';
Are you trying to delete the cookie on the client side?
if so try:
setcookie ('foo', '', time() - 3600);
http://us2.php.net/setcookie
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
Linux. PHP5.
Maybe I'm doing something wrong, but I've tried both:
unset($_COOKIE['foo']);
And also
$_COOKIE['foo'] = '';
And neither of them seem to do anything. I can still see the cookie and
worse, the value if I do
foreach ($_COOKIE as $key => $val) echo "$key = $val";
--
PHP General Ma
Hi,
Looking for a one-liner to delete all empty elements in an array. I
know I can do it with a foreach loop, but I'm hoping that I've missed
an existing function in the manual which may already do this, or a
simple one-liner to replace the foreach.
$v) {
if(empty($v)) {
Hello John,
> From: JohnT [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 10, 2004 4:54 AM
>
> Hello,
>
> mind explain a little bit further cause i'm confused and not
> sure if the
> fuction really work or something
>
> [some Code]
As far as I know (or understand), unset() will only destr
Hello,
mind explain a little bit further cause i'm confused and not sure if the
fuction really work or something
On 1st example using unset() in a function
/// CODE /
function foo() {
static $a;
$a++;
echo "$a";
unset($a);
}
foo();
foo();
foo();
/
On Monday 13 October 2003 18:47, Ciprian Trofin wrote:
> I have a form with 3 checkboxes x1,x2,x3. I want to build an array of
> values from the checked boxes; I choosed the following approach:
> 1. build an array with all values
> 2. eliminate from array the "" values using unset
The checkboxes t
On Mon, 13 Oct 2003 12:47:44 +0200, you wrote:
>I have a form with 3 checkboxes x1,x2,x3. I want to build an array of
>values from the checked boxes; I choosed the following approach:
>1. build an array with all values
>2. eliminate from array the "" values using unset
>
>For some reason, the code
I have a form with 3 checkboxes x1,x2,x3. I want to build an array of
values from the checked boxes; I choosed the following approach:
1. build an array with all values
2. eliminate from array the "" values using unset
CODE:
$x = array($_POST['x1'],$_POST['x2'],$_POST['x3']);
do {
for ($i
On Thu, Jul 25, 2002 at 10:26:03PM +0200, Bas Jobsen wrote:
> Hello,
>
> I have this example code:
> function doprint($a){foreach($a as $value)echo $value;}
> doprint(array('1','test','hello','and'));
>
> Question, is the array in memory after the function call?
> So, should it be better to use
Hello,
I have this example code:
function doprint($a){foreach($a as $value)echo $value;}
doprint(array('1','test','hello','and'));
Question, is the array in memory after the function call?
So, should it be better to use this:
function doprint($a){foreach($a as $value)echo $value;}
doprint($tem
i need to remove elements in array which are empty.
this code works but is it ok to do it like this?
code:
if(in_array("", $people)) unset($people[array_search("", $people)])
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It is working.
The last two tests you were running weren't actually the same, which was
confusing your testing results. I've altered the code a little for ease of
testing. It's included below.
-Original Message-
You will see that $unserialized['foo'] still exists! Can anyone explain me
Hello,
I am currently testing out some things with removing elements from arrays,
and I find it strange that the following statement does not work for me:
unset($array['element'])
I wrote a little test script, you can see the source at
http://www.antrophia.com/test.txt and the executable at
htt
I was doing something wrong... ;) I figured it out. Sorry for the post --
it was one of those things that took me *forever* to figure it out and when
I saw the problem I felt like an idiot -- oh well.
Thanks anyway.
Jason
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">ne
On Friday 07 June 2002 09:04, Jason Caldwell wrote:
> i'm trying to unset an array element within my array --
>
> my array looks like;
>
> $foo[0][magazine]
> $foo[0][subscription]
> $foo[0][term]
> $foo[0][rate]
>
> $foo[1][magazine]
> $foo[1][subscription]
> $foo[1][term]
> $foo[1][rate]
>
> and
that didn't work.
"Mark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
first try quoting your strings and see if that helps :)
$foo[0]["magazine"]
On Thu, 6 Jun 2002 18:04:47 -0700, Jason Caldwell wrote:
>i'm trying to unset an array element within my array -
first try quoting your strings and see if that helps :)
$foo[0]["magazine"]
On Thu, 6 Jun 2002 18:04:47 -0700, Jason Caldwell wrote:
>i'm trying to unset an array element within my array --
>
>my array looks like;
>
>$foo[0][magazine]
>$foo[0][subscription]
>$foo[0][term]
>$foo[0][rate]
>
>$foo[1
i'm trying to unset an array element within my array --
my array looks like;
$foo[0][magazine]
$foo[0][subscription]
$foo[0][term]
$foo[0][rate]
$foo[1][magazine]
$foo[1][subscription]
$foo[1][term]
$foo[1][rate]
and so forth --
when i call unset($foo[0]) for example, the entire array goes aw
Just a quick question -- the man page for unset() doesn't mention
anything about unsetting arrays, but does it work the same way? I have
this if/elseif/else statement (pseudocode):
$error_msgs = array();
if (there is a problem) {
$error_msgs[] = "error message 1";
} elseif (there is a diffe
Hello,
> $func = "make_" . $wat;
> $temp = $$func($this);
I think one $.
$func = "make_" . $wat;
$temp = $func($this);
will work
Bas
Op donderdag 31 januari 2002 12:17, schreef u:
> Hoi Bas,
>
> $func = "make_" . $wat;
>
> $temp = $$func($this);
>
> bvr.
>
> On Thu, 31 Jan 2002 11:55:12 +0100
On Thu, 2002-01-31 at 02:55, Bas Jobsen wrote:
> Hello,
>
> > Thanks all. I will rename the second function.
>
> Now if have:
>
> if($wat=="naam")$temp=make_naam($this);
> else if($wat=="anderenaam")$temp=make_anderenaam($this);
> //etc..
>
> But i would prefer something like
> $temp=make_$wat
Hoi Bas,
$func = "make_" . $wat;
$temp = $$func($this);
bvr.
On Thu, 31 Jan 2002 11:55:12 +0100, Bas Jobsen wrote:
>Hello,
>
>> Thanks all. I will rename the second function.
>
>Now if have:
>
>if($wat=="naam")$temp=make_naam($this);
>else if($wat=="anderenaam")$temp=make_anderenaam($this);
Hey Bas,
BV>But i would prefer something like
BV>$temp=make_$wat($this);
I think you might want something along these lines:
eval("make_$wat($this);");
HTH
-jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
Hello,
> Thanks all. I will rename the second function.
Now if have:
if($wat=="naam")$temp=make_naam($this);
else if($wat=="anderenaam")$temp=make_anderenaam($this);
//etc..
But i would prefer something like
$temp=make_$wat($this);
How can i do this?
Tnx,
Bas
--
PHP General Mailing List (
Hi,
Thanks all. I will rename the second function.
Bas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
> include_once() won't help. In fact, he is including each file only once.
> He wants to have a function with the same name in each file. That's the
> kicker...
oh well that's silly, don't do that. also consider function_exists()
regards,
Philip Olson
--
PHP General Mailing List (http://ww
In article ,
[EMAIL PROTECTED] (Philip Olson) wrote:
> > > include("file1");
> > function_somename();
> > include("file2");
> > function_somename();
> > ?>
> >
> > file1 and contain a function definition, but the function in both files had
en
Cc: PHP List
Subject: Re: [PHP] unset a function?
This sounds like a job for include_once
www.php.net/include_once
regards,
Philip Olson
On Wed, 30 Jan 2002, Bas Jobsen wrote:
> Hello,
>
> I have this:
> include("file1");
> function_somename();
>
This sounds like a job for include_once
www.php.net/include_once
regards,
Philip Olson
On Wed, 30 Jan 2002, Bas Jobsen wrote:
> Hello,
>
> I have this:
> include("file1");
> function_somename();
> include("file2");
> function_somename();
> ?>
>
> file1 and contain a function definition, b
ary 30, 2002 2:52 PM
> To: PHP List
> Subject: [PHP] unset a function?
>
>
> Hello,
>
> I have this:
> include("file1");
> function_somename();
> include("file2");
> function_somename();
> ?>
>
> file1 and contain a function definition,
what happened when you tried unset()?
-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 2:52 PM
To: PHP List
Subject: [PHP] unset a function?
Hello,
I have this:
file1 and contain a function definition, but the function in both files
Hello,
I have this:
file1 and contain a function definition, but the function in both files had
the same name. This will give "Cannot redeclare ". So can i unset the
function before the second include?
Tnx,
Bas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
Hello everyone!
Is there a way to unset or expire a cookie which was not set by my pages?
Michael
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL
anyone know why this isnt working for me?
if (isset($PHP_AUTH_USER) && isset($PHP_AUTH_PW)) {
CheckCredentials($PHP_AUTH_USER,$PHP_AUTH_PW);
unset ($PHP_AUTH_USER, $PHP_AUTH_PW);
} else if ($AuthAction) {
auth($AuthAction);
};
If someone submits false credentials, the pag
If that's the code you're running, it's got several
problems--
1st, the function is mysql_query()
2nd, the query is built like this:
$connection = mysql_connect('host', 'user', 'pass');
$db = mysql_select_db('db', $connection);
$query = "SELECT * FROM tablename WHERE primary_key =
'$primary_key'
I need to return a "file not found" if the search item is not found..
tryed my_sql_query(select from table where primary key = $primary key)or die
"file not found"
that didn't work
suggestions anybody? please? purty please?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Hi
Why doesn't unset($this) work inside a instance of a class?
I have found a workaround, but it isn't so smart...
Laus Brandt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list ad
";
unset( $array[ 'test' ] );
echo "after " . $array[ 'test' ];
?>
returns:
before chris
after
hence, the unset function works fine for me. what version of php are you
running?
""Tom"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I can't seem to get uns
I can't seem to get unset() to work when I'm strying to delete an
element from an array.
I have a select list that is populated by an array, and i need to
be able to delete items from the list by deleting them from the
array, but I don't know how.
I tried using unset($array['element']); but i
I wrote a function inside a file which I included with a require() call.
The function takes four arguments by reference (because I need to pass back
four values). The first thing it does is to call unset() four times to unset
these arguments, so that it can enter new data into them. This will
96 matches
Mail list logo