looks like because you have a dash inside your character class; when inside
a character class the dash is a special character and you'd have to escape
it
eregi("^([a-zåäö_\.\- ]+)$", $value);
"Peter A" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
when I do thi
you could first read the files and their modified-dates into an array; sort
the array; and finally build a select widget from the array...
function sortByTime($a, $b)
{
if ($a["time"] == $b["time"]) return 0;
return ($a["time"] < $b["time"]) ? -1 : 1;
}
while (false !== ($file = readdir("
you can use the (optional) headers argument to mail() and add the From
header:
mail ($to, $subject, $body, "From: $from");
"Beauford.2002" <[EMAIL PROTECTED]> wrote in message
000f01c294e0$6ce1fcd0$6401a8c0@p1">news:000f01c294e0$6ce1fcd0$6401a8c0@p1...
> Hi,
>
> I have a form where a user enters
true or false:
when declaring a function, a given argument can be declared to pass by
reference, or can be declared to have a default value, but never both.
i.e., you can only write one of:
function foo(&$param)
function foo($param = "bar")
but never the equivalent of:
function foo(&$param = "ba
i think you have to have an Options directive set for a particular directory
to turn on or off the directory listing page. the particular feature in
question is called Indexes. check out this page for more info:
http://httpd.apache.org/docs/mod/core.html#options
for example, to disable indexes
"Nick Eby" <[EMAIL PROTECTED]> wrote :
> that will work just fine. think of it this way- the array $item is
> registered (and maybe unregistered) with the session, but its elements
> aren't individually registered with the . just
register/unregister the
&g
"@ Nilaab" <[EMAIL PROTECTED]> wrote:
> Hello,
> How do I unregister a single array item from an array? For example:
>
>
> session_start()
> session_register("item");
>
> $item['name'] = "Some Name";
> $item['img'] = "some_image_name.jpg";
> $item['desc'] = "Some Description";
> $item['price'] = 40
you can use the implode() function:
for ($z=0;$z wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All :)
>
> I have a form that is being passed to a mail function when submitted. It
is
> working OK, except that I am having trouble with values from arrays such
as
> checkbox lists.
seems to me that you're trying to have an object's member behave as if it
had global scope. you never say "$foo = new bar()". instead you say
"$this->foo = new foo()" where $this is an instance of Overall. you can't
instantiate a Foo as a member of an Overall instance, and then expect to
talk to
even further, instead of using fgets() to get each line and then exploding
it, you can use fgetcsv() which reads the line and breaks it into chunks by
any delimiter, returning the chunks in an array.
$fp = fopen($filename, "r");
while (!feof($fp))
{
$line = fgetcsv($fp, 9, "|");
...
}
"Kevin Stone" <[EMAIL PROTECTED]> wrote:
> I think you're trying to defy logic here. How will the function know that
> you want to keep color=>cherry or flavor=>cherry? What logical construct
> makes that decision? The example you've given will result in an array
that
> looks eactly like $arr1 r
021109001822.33085.qmail@;pb1.pair.com...
> array_diff check value, not keys..
>
> "Nick Eby" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
> > example:
> > $arr1 = array("color" => "red", "flavor" =>
in case anyone cares, here is my solution so far, please comment if you feel
the need.
function myArrayDiff($thing1, $thing2)
{
$diff = array();
while (list($key, $val) = each($thing1))
{
if ((string)$val !== (string)$thing2[$key])
$diff[$key] = $val;
}
return $diff;
}
--
PHP Genera
example:
$arr1 = array("color" => "red", "flavor" => "cherry");
$arr2 = array("color" => "cherry", "flavor" => "red");
print_r(array_diff($arr1, $arr2));
those 2 arrays are different, but array_diff doesn't know it since it
doesn't compare values at particular keys, just values in general. i want
you could make a union of all the records, and order by newest date first:
(select id, date, name, text from table1) union
(select id, date, name, text from table2) union
(select id, date, name, text from table3) order by date desc
then select the first record
/nick
--
PHP General Mailing Lis
be wary of IE on a macintosh, i seem to remember that IE5 on a mac has the
same nuts and bolts as IE4 on windows. can anyone back me up on that?
"Pushpinder Singh Garcha" <[EMAIL PROTECTED]> wrote in message
news:9787EE5E-EC3E-11D6-A12B-003065DBDE68@;masterstream.com...
> hi all
>
> I am using a
is Constants.inc in the same directory as Stylesheet.php?
"Liam Gibbs" <[EMAIL PROTECTED]> wrote in message
news:D64360C926B9F34F8B35F78D07B8E7A2716E23@;postman.dfait-maeci.gc.ca...
> Still having trouble with CSSs. Now it's a different error. Below is my
CSS
> code. For some reason, I can't get
Hi,
I disagree that serialize/unserialize is the way to go, unless you're
absolutely completely sure that there will only be a relatively small number
of things in the array. As somebody mentioned briefly, the get request is
limited to a certain number of bytes, and the string representing your
s
"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
news:20021028122405.4F05.MAXIM@;php.net...
> What's the Oracle version?
8.1.7
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm running oracle 8.1.7 w/ php 4.2. I use the oci8 functions to update
clob columns, and maybe 1 out of every 15 or 20 times, updating a clob
column causes the mysterious "ora-600, internal error code". Anybody out
there experienced this (and hopefully resolved it) who can shed some light?
thank
"Chris Boget" <[EMAIL PROTECTED]> wrote in message
news:023501c27c62$23b74dd0$8c01a8c0@;ENTROPY...
> Ok, let me see if I have this right:
>
> When you do:
>
> $var = new myClass();
>
> $var instantiates and holds a copy of myClass.
No. The "new" operator makes a new object which is an instance o
"Jennifer Swofford" <[EMAIL PROTECTED]> wrote:
>Is there an easy way to upload an entire directory? Rather than selecting
the 19 files in a directory, to just select the directory, and have all its
contents go with it? (Or even a not-such-an easy way?)
Since uploading a file to your webserver
> here is the error message,
> Warning: Cannot add header information - headers already sent by
> (output started at /home3/www/antriksh/resources/action2.php:5) in
> /home3/www/antriksh/resources/action2.php on line 13
>
> any help?
>
that warning is probably generated because you're using the h
wait, I take that back... I meant "to see uninitialized variable use", since
there's really no such thing as "declaring" a variable in PHP unless it's a
class member.
"Nick Eby" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:
There's 2 ways to get that: use the php.ini setting ERROR_REPORTING, or the
function error_reporting(). to see undeclared variable use, call
error_reporting(E_NOTICE) at the top of your script.
http://www.php.net/manual/en/function.error-reporting.php
/nick
"R . Z ." <[EMAIL PROTECTED]> wrote
check the manual page for ereg... you'll find that it takes 2 parameters
minimum, and the return value is not what your code expects it to be.
http://www.php.net/ereg
"Bryan Koschmann - Gkt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Okay, I think I'm just
have
to know on what class they were called. anyway thanks again
/nick
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Nick Eby" <[EMAIL PROTECTED]>
Cc: "Debbie Dyer" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent:
icFunc() { echo get_class($this); }
}
Class B extends A {}
B::staticFunc();
thanks again
/nick
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Debbie Dyer" <[EMAIL PROTECTED]>
Cc: "Nick Eby" <[EMAIL PROTECTED]>; <[EMAIL
esult.
sorry this is so confusing, I probably should've used the term "static" from
the beginning.
/nick
- Original Message -
From: "Debbie Dyer" <[EMAIL PROTECTED]>
To: "Nick Eby" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wedn
;
> print $c->foo();
>
> Is this what you mean?
>
> Debbie
>
> - Original Message -
> From: "Nick Eby" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 02, 2002 6:29 PM
> Subject: [PHP] Inheritance and a cl
Assume you've got some class that has one or more classes inherited from it.
The parent class has a function that is normally called using the ::
operator (a class function). Assume also that the class function is never
called from an object function. Is it possible to find if the class
function
31 matches
Mail list logo