Please, answer:
what construction works faster:
if ( isset ( $result [$i] ["key"] ) )
{do something; }
or
if ( array_key_exists ( "key", $result [$i] ) )
{do something; }
?
Nikolay
After a little test, although the results are not conclusive, I would
say that isset(), and also that array_key_exists() may even use isset()
(or similiar) internally as a first step -let's remember that isset()
only does a "fast search" and it returns FALSE if the value is NULL; on
the other
[snip]
If it's not "wrong" for me to push the "back" button, why are you
breaking it with all your re-directs :-)
[/snip]
I was a bit short in my explanation -- I tend to use the redirect
method so that users *can* use the back button (or refresh). I'm
trying to *not* break it. :)
That said, the
THANKS!
That did the trick.
For future reference to all people needing to calculate check digits with
ISO 7604 (MOD 97-10) method:
$check=98-bcmod(($num."00"),97);
The ."00" part is imporant... If $num was multiplied by 100 we wouldn't get
a correct value in bcmod.
Marco Almeida
Project Mana
Mehmet Fatih Akbulut wrote:
hi all,
today, i get this error frequently :
do people keep coming up to you
in the street and shouting 'DB Error' at
you or what?
A fatal error has occurred
DB Error: extension not found
[line 542 of /var/www/horde/kronolith/lib/Driver/sql.php]
...
but php5-mysq
On 2/16/06, tedd <[EMAIL PROTECTED]> wrote:
However, after given it some thought, I would imagine that one could
get a unique generated string, create a file with that string, give
the file the correct permissions, then pull the image from the dB and
save, do image processing, and then reloa
On Sat, 2006-02-18 at 04:56, Rafael wrote:
> After a little test, although the results are not conclusive, I would
> say that isset(), and also that array_key_exists() may even use isset()
> (or similiar) internally as a first step -let's remember that isset()
> only does a "fast search" a
- Original Message -
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Rafael" <[EMAIL PROTECTED]>
Cc: "PHP-General"
Sent: Saturday, February 18, 2006 3:21 PM
Subject: Re: [PHP] Re: "isset" or "array_key_exists"?
On Sat, 2006-02-18 at 04:56, Rafael wrote:
After a little test, althou
I am puzzled by the following code:
MaxInt=".PHP_INT_MAX;
$AA = -190668411;
$BB = -2181087916;
print "AA=$AA";
print "BB=$BB";
$AA = (int)$AA + (int)$BB;
print "AA+BB=$AA";
?>
On some systems, I get:
MaxInt=2147483647
AA=-190668411
BB=-2181087916
AA+BB=-2338152059
On others, I get:
MaxInt=2147
Consider the following code:
$BB = -2181087916;
$AA = (int)$BB;
$AA = intval($BB);
On some systems, $AA will be int(-2147483648), which is actually
consistent with the documentation.
On most systems, however, $AA will be int(2113879380), which is the
same value truncated
Bruce wrote:
Consider the following code:
$BB = -2181087916;
$AA = (int)$BB;
$AA = intval($BB);
On some systems, $AA will be int(-2147483648), which is actually
consistent with the documentation.
On most systems, however, $AA will be int(2113879380), which is the
same v
On 2/17/06, Paul Goepfert <[EMAIL PROTECTED]> wrote:
> I forgot to mention that that php and mysql are installed on a windows
> machine which means I didn't have to run the configure script that
> would associate mysql with php. How do I do this on a windows
> machine?
Open up php.ini, check tha
On 2/18/06, John Wells <[EMAIL PROTECTED]> wrote:
> That said, the unique token method is very interesting, I'll
> definitely check it out. But I'm curious, if you check for an
> existing token and do find one (so the user has possibly refreshed the
> browser), don't you have to program a particul
I need a way to retrieve a URL typed by anyone who is visiting my site so
that I can redirect someone who typed for exemple www.site.com, to one of
the folders I have in the directory, and if that user typed
www.othersite.com he would be sent to another folder. I thank any insight.
Rodrigo
Actually, it doesn't have much sense that it creates a variable (or
index), though it had sense why wouldn't be so easily detected, so I
printed the array after the loops and there's no new keys. I think that
if that was the case, it was definitely a bug that has been corrected
(PHP 4.4.0)
*
I need a way to retrieve the URL typed by anyone visiting the website, so
that I can rerout them to the apropriate folder, does anyone know how to do
this?
I got a message saying that I should use the phpinfo and use the variables
that are given as response, but the problem is that the variable th
On 2/18/06, Ministério Público <[EMAIL PROTECTED]> wrote:
>
> I need a way to retrieve a URL typed by anyone who is visiting my site so
> that I can redirect someone who typed for exemple www.site.com, to one of
> the folders I have in the directory, and if that user typed
> www.othersite.com he wo
Hi gang:
Question: I know you can set a directory to have certain permissions,
but how do you set the permissions to be recursive? In other words,
for example, if you set the directory to be 755, then everything
placed within that directory will also be 755.
Thanks.
tedd
--
---
! reverses a true/false input. I use it to flip a setting on or off.
Gerry
On 2/17/06, Jeff <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I've got some code from someone else I've inherited and need to sort out
> some problems with. The programmer that wrote it originally was much
> better than I an
On 2/18/06, tedd <[EMAIL PROTECTED]> wrote:
> Hi gang:
>
> Question: I know you can set a directory to have certain permissions,
> but how do you set the permissions to be recursive? In other words,
> for example, if you set the directory to be 755, then everything
> placed within that directory wi
Hi Guys,
I'm looking for some help in buiding up the right queries / code for
this. I have a database that tracks all the plays of my Football Team.
Here are the relevant Fields:-
Formation
OCall
DCall
OYards
Key
The key is an amalgam of the first 3 fields so a typical record might
look l
im trying to get my regular pattern to allow åäöÃ
ÃÃ but it refuses to,
i have something like this:
[^a-zA-ZåäöÃ
ÃÃ0-9-_ ]
But this dosent seem to work, anyone got any ideas?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
im trying to get my regular pattern to allow åäöÅÄÖ but it refuses to,
i have something like this:
[^a-zA-ZåäöÅÄÖ0-9-_ ]
But this dosent seem to work, anyone got any ideas?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
on 02/18/2006 07:42 PM Patrick said the following:
> im trying to get my regular pattern to allow åäöÅÄÖ but it refuses to,
> i have something like this:
>
> [^a-zA-ZåäöÅÄÖ0-9-_ ]
>
> But this dosent seem to work, anyone got any ideas?
It seems your message is in Windows-1252 encoding. M
- Original Message -
From: "Patrick" <[EMAIL PROTECTED]>
im trying to get my regular pattern to allow åäöÅÄÖ but it refuses to,
i have something like this:
[^a-zA-ZåäöÅÄÖ0-9-_ ]
But this dosent seem to work, anyone got any ideas?
Just an idea, try putting a backslash before the no
To know what exactly URL was asked use this:
'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'?'.$_SERVER['QUERY_STRING']
However when a rewritten URL was used with mod_rewrite Apache module my
code above will simply show you the transformed URL. The real requested
URL in this situatio
On Sat, 2006-02-18 at 12:39, Rafael wrote:
> Actually, it doesn't have much sense that it creates a variable (or
> index), though it had sense why wouldn't be so easily detected, so I
> printed the array after the loops and there's no new keys. I think that
> if that was the case, it was
On 2/18/06, tedd <[EMAIL PROTECTED]> wrote:
Hi gang:
Question: I know you can set a directory to have certain permissions,
but how do you set the permissions to be recursive? In other words,
for example, if you set the directory to be 755, then everything
placed within that directory will a
Just a couple of questions/points to make all clear:
a) are you aware that the "^" at the beggining inverts its meaning?
b) if you want to allow (or "not fail with") "-", put it as the fist
(or last?) character of the class, since it is used to define
ranges, and this avoids misinter
just testing my news connection
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi everybody,
I have been trying to find a solution to this issue on other newsgroups but
haven't had any luck so far.
My config: Apache 2.0.54, PHP 5.1.2 on Win XP (or 2003).
Here is the outline of my application:
The user submits a form to the server, which is then processed by a php
script.
Hello,
on 02/19/2006 02:00 AM Adrian said the following:
> I tried various ideas, using header( ... ) to start other scripts etc, but
> so far nothing worked - things always happen synchronously (start
> processing, wait for it to finish, show result) which is not what a user
> would expect. Also,
I'm currently running OpenLDAP with some users populated in the
database. I would like to use PHP to create a web page where my ldap
users can enter their username and password credentials to log into our
intranet. Can someone point me to some expample scripts, articles, or
sites. Thanks.
33 matches
Mail list logo