two possibilities:
- put your array in a form with hidden fields
- use sessions
I would prefer the second option (check manual for sessions)
Greets,
Edward
- Original Message -
From: "Hirono Tanaka" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 10:33 AM
try:
print ereg_replace("^([0-9]{3})([0-9]{3})([0-9]*)$", "(\\1) \\2 - \\3",
$phone_number);
Greets,
Edward
- Original Message -
From: "Erik Price" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 10, 2002 4:13 PM
Subject: [PHP] formatting a numeric string
> I have
Hi,
I'm creating an FTP script for uploading files... but now, when I pull out
the network plug of the server (so the connection is lost), my program
doesn't stop running... any ideas of how to check if a connection is still
alive?
Edward
// partial code:
for ($i=0; $ihttp://www.php.net/)
To
use regular expressions:
if (ereg("MSIE 5.5", $HTTP_USER_AGENT)) {
}
Greets,
Edward
- Original Message -
From: "Ron" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 1:46 PM
Subject: [PHP] Comparrison
> How would I compare to variables where I would want
As Oliver says, it is possible in PHP, but then you have to do it, AFTER the
form is submitted... Just do some regular expressions on your data before
displaying / storing it...
Edward
- Original Message -
From: "Andre Dubuc" <[EMAIL PROTECTED]>
To: "Edward van
maybe you better use:
session_unregister("counter");
Greets,
Edward
- Original Message -
From: "Carlos Costa Portela" <[EMAIL PROTECTED]>
To: "php-general mailing list" <[EMAIL PROTECTED]>
Sent: Saturday, March 16, 2002 4:49 PM
Subject: [PHP] Problem with sessions.
> Hello all:
>
> I
Just use javascript... (be careful, what works with IE, doesn't
automatically work with Netscape)...
Greets,
Edward
- Original Message -
From: "Andre Dubuc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 16, 2002 4:44 PM
Subject: [PHP] Formatting input text?
> I won
or use something like this:
$array_values = array(1,2,3,4);
if (in_array(user($arbitraryVariable), $array_values)) {
// do your stuff
}
Greets,
Edward
- Original Message -
From: "Christoph Starkmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 4:11 PM
S
Jep, that was what I meant... sorry Erik, didn't read your question right...
Edward
- Original Message -
From: "Jan Rademaker" <[EMAIL PROTECTED]>
To: "Erik Price" <[EMAIL PROTECTED]>
Cc: "Edward van Bilderbeek - Bean IT" <[EMAIL
s,
Edward
- Original Message -
From: "Erik Price" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>
Cc: "Phil Schwarzmann" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 10:58 PM
Subject: Re: [
you can't use a variable as a parameter for the included file... because
include does nothing else then putting the text of the include file on the
place of the include statement...
so this should work:
$var = 'bladibla';
include('index.php');
Greets,
Edward
- Original Message -
Fro
check the 1001 sort functions in the manual http://www.php.net for
instance...
Edward
- Original Message -
From: "Uma Shankari T." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 1:36 PM
Subject: [PHP] Sorting in php
>
> Hello,
>
> Can anyone please tel
the single quotes you use for your echo indicate that the variable in your
echoed string won't be parsed double quotes indicate that it will be
parsed...
e.g.
$test = 1
echo '$test' // prints: $test
echo "$test" // prints: 1
Greets,
Edward
>
> > hello,
> > Someone was kind enough
just use something like this in your while-loop:
if ($counter % 5 == 0) {
print "";
}
Greets,
Edward
- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 5:08 PM
Subject: Re: [PHP] 5 Records per line
> On Tuesday 12 Ma
why aren't you posting this on the general PHP list?
you should upload the word doc and then base64encode it into you
mailmessage... there are some mailclasses available on the internet... check
them out...
Edward
- Original Message -
From: "Swati Patil" <[EMAIL PROTECTED]>
To: <[EMA
guess that should be:
alert(document.babai.bongu.selectedIndex);
Greets,
Edward
- Original Message -
From: "Balaji Ankem" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 11:23 AM
Subject: [PHP] Hi problem with selected value!!
> Hi friend,
> c
isn't it the easiest way to do something like this:
class test {
function do ($var) {
if ($var=='you') {
$this->you_function();
} else {
$this->me_function();
}
}
function you_function() {
...
}
function me_func
something like:
for ($i=ord('A'); $i
To: "[General]" <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 11:37 AM
Subject: [PHP] Alphabet
Is there a simple function to generate
the alphabet with php
Thx
Jeroen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
> > Try thinking?
>
> Don't be a jerk.
>
Don't be a programmer...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
tion...
Edward
- Original Message -
From: "Bas Jobsen" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>
Sent: Wednesday, February 27, 2002 4:53 PM
Subject: Re: [PHP] textarea
>
> echo addslashes($text);
>
>
> Op woensdag
Hi,
I've got a strange HTML problem... When I have a textarea, and put a large
text in it, the submit button isn't working if the text is very long, but it
is working till a certain amount of characters (didn't check out which
amount)
I can click as many times as i want on the submit button,
What about:
ENV["USER"]
or
ENV["USERNAME"]
(see phpinfo())...
Greets,
Edward
- Original Message -
From: "Bogdan Stancescu" <[EMAIL PROTECTED]>
To: "Martin Towell" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Stewart Gateley" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday,
array_search returns the key-value of the searched value that is found... in
the first case... the returned key is 0 because it's the first
element... however... 0 is also the same as FALSE...
you should use === (three ='s) ... it's used to compare both value and
type... (and 0 is not the sam
http://www.php.net/manual/en/function.array-count-values.php
- Original Message -
From: "jtjohnston" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 24, 2002 10:49 PM
Subject: [PHP] Convert An Array
> http://ccl.flsh.usherb.ca/db/authors_under_study.php
> or
> $name
every script you use the variable should contain a "session_start()"
statement...
- Original Message -
From: "Michael Kimsal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 23, 2002 5:26 PM
Subject: [PHP] Re: Newbie on Sessions/Pages Management
> Alexander P. Javie
to me it just seems that that site is using a frameset... and changing one
frame, doesn't change the body of the parentframe... and that frame is being
just for the URL shown.
The class='click' thing is just used for layout purpose... check out CSS
(Cascading Style Sheets) for more informatio
why can't i see anywhere in this code what value:
$row["PicNum"];
contains?
try:
instead of:
" >
if, it's working then, then your error is there...
Greets,
Edward
- Original Message -
From: "Narvaez, Teresa" <[EMAIL PROTECTED]>
To: "'Lars Torben Wilson'" <[EMAIL PROTECTED]>; "Andr
if you move your mouse over the "Download Now" section... what is the
statusbar displaying??
Edward
- Original Message -
From: "Narvaez, Teresa" <[EMAIL PROTECTED]>
To: "'Sanduhr'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 5:05 PM
Subject: RE: [PHP] Re: N
Greets,
Edward
- Original Message -
From: "Sven Jacobs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 4:56 PM
Subject: [PHP] Date calculations
> Hey
>
> I need to calculate the amount of days between 2 point
> point 1 is now the second point is in the
first of all:
why do you use:
[0-9][0-9]*...
you better use: [0-9]+ then
same goes for \w
and I guess you don't need the ('s and )'s either...
Edward
- Original Message -
From: "German Castro Donoso" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 5:26 PM
Su
Well, as long as you use double quotes: " the variables will be parsed
inside you statement... single quotes however mean the exact string...
example:
$icon = "1.jpg";
$str = "this is the image $icon";
$str2 = 'this is the image $icon';
print $str; // returns: "this is the image 1.jpg"
print $st
just put the lines in an array, each array element contains a line... and
then just print the specified array elements...
Edward
- Original Message -
From: "John Gurley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 12:55 PM
Subject: [PHP] printing files
it was last week though...
guesss you mean 29th?
Edward
"LaserJetter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Using the code below:
>
> $buffer['Last_access'] = 1013336429;
> $date = date("H:i D, nS M Y",$buffer['Last_access']);
> print $date;
>
> pri
don't know if there is some "date_diff" -like function, but you can do it
this way:
$now = getdate();
$nw_year = $now["year"];
$nw_month = $now["mon"];
$nw_day = $now["mday"];
$chk_date = "09/02/1977";
list ($chk_day, $chk_month, $chk_year) = explode("/", $chk_date);
print $nw_year;
$age = $nw_
or:
SELECT LEFT(date, 7) as YearAndMonth FROM table;
Edward
- Original Message -
From: "val petruchek" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Saturday, February 09, 2002 2:28 PM
Subject: Re: [PHP] One more quickie
> > Don?t really want to bother you with these quick
just quote the 'y' in your query:
$ynumber = mysql_query("SELECT COUNT(*) As Cnt FROM responses WHERE
response='y'");
Edward
- Original Message -
From: "Ron Clark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 08, 2002 7:38 PM
Subject: [PHP] Syntax ???
> -BEGI
after some puzzling I came to this:
$str = "One as a start. This is or was a test for short words, although an,
should be deleted to.";
$str = preg_replace(array("/\b[A-Za-z']{1,3}\b/",
"/[ ]{1}([ ]{1}|[,]{1}|[.]{1}|[:]{1})/"), array("", "\\1"), $str);
print $str;
which means:
first: replac
})[a-z']{1,3}([ ]{1}|[,]{1}|[.]{1}
|[:]{1})", "\\2", $str);
}
Greets,
Edward
print $str;
- Original Message -
From: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Michael Kimsal" <[EMAIL PRO
I don't know if this is the best way but:
$str = "This is or was a test for short words";
while (ereg(" [a-z]{1,3} ", $str)) {
$str = eregi_replace(" [a-z]{1,3} ", " ", $str);
}
print $str;
this replaces all occurences of a space followed by 1,2 or 3 alphabetic
characters followed by a space.
$array_foo = explode(",", $foo);
for ($i=0; $i
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 06, 2002 1:54 PM
Subject: [PHP] Create Mysql Records From a Comma separated Values String
>
> Hi to everyone
>
> i have the following problem
>
> i have a string $foo which contains (n variable) co
check out: setlocale()
Greets,
Edward
- Original Message -
From: "Nicolas Llamosas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 4:13 PM
Subject: [PHP] Change of Language
> How can in change the language in my site? (spanish)
> for example using the fun
try using something like this:
$varname = $categories[0];
echo ${$varname}[0];
Greets,
Edward
"Andy" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> Hi there,
>
> I have a tricky array question.
>
> My app is passing via post a array variable called glacier. Now I
shouldn't it be:
uksort($array_array,"cmp");
Greets,
Edward
- Original Message -
From: "Sondra Russell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 5:52 AM
Subject: [PHP] uksort wisdom
> Hi Guys!
>
> I'm looking to get a *deeper understanding* of ukso
i think it is the strtotime() function that gives the trouble... why don't
you try mktime() ?
> sounds like it might have something to do with leap year.
>
> Jim Lucas
> - Original Message -
> From: "toni baker" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 04,
like this:
$digit = 122;
$digits = sprintf ("%08d", $digit);
print $digits;
Greets,
Edward
- Original Message -
From: "Jeff Sheltren" <[EMAIL PROTECTED]>
To: "Andy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, February 02, 2002 6:41 PM
Subject: Re: [PHP] Adding 6 digits
what also is a great help, is sending yourself an email with an attachment,
en check the sourcecode of your mail... (in outlook that is: properties,
details, message source)... one tip: don't forget the empty lines between
the sections...
Greets,
Edward
- Original Message -
From: "Mike
Wow, thanks a lot...
although it should be \\0 here...
didn't see anything in the manual about the \\ maybe gotta look for it again
:-)
Thanks,
Edward
- Original Message -
From: "Richard Crawford" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek - Bean
ake it easier? not for me :-)
Greets,
Edward
- Original Message -
From: "Jeff Sheltren" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 11:06 PM
Subject: Re: [PHP] er
hmm, that's not what i wanted to hear :-)))
e.g. try doing that for the word: transparancy looots of different
possibilities then...
Edward
- Original Message -
From: "Jeff Sheltren" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek - Bean IT&quo
Oh, that was a typo... sorry...
it should be:
"This equals this equals tHis" -> "That equals that equals tHat"
Edward
- Original Message -
From: "Jeff Sheltren" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROT
that is not what I meant... I want the cases to remain...
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002
hi,
is there a simple way to replace an occurence of a string, into another,
maintaing capital positions...
Like:
$str = "This equals this equals tHis";
and I wanna replace all occurences of "this" in "that", that the result will
be:
$str = "That equals that equals That";
Edward
--
PHP Ge
Maybe this is a solution for you:
instead of:
1data 1
2data 2
3data 3
4data 4
you can do this:
1data 1
2data 2
3data 3
4data 4
If you can't beat them, join them!
Greets,
Edward
"Adam Leckron" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> f
huh?
well, use md5()...
if you want a password that can be decrypted too, I'm afraid you have to
write you're own encryption / decryption algoritm... maybe you can use
base64encode() (don't know for sure)... but in both cases, if someone
guesses your used encoding algoritm, you have a problem...
The whole idea of MD5 is to generate a unique code from your string. It's
practical impossible to generate an identical string that creates the same
unique code. So youcan be sure that someone that creates the same code also
created the same text... e.g. a password...
it's impossible to reverse t
and if you want to write it to a file directly then do something like:
exec('ftpusers > filename.txt');
Greets,
Edward
> Take a look at
>
> exec()
> passthru()
> system()
>
> Keep in mind that the webserver usally runs as User nobody or an
equivilant
> of that. So this user should have rights
I recommend sending yourself a mail with an attachment and check the
sourcecode of the received mail... together with base64encode() you should
be able to do the job...
Edward
- Original Message -
From: "Rafael Perazzo B Mota" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday,
including a file is nothing more then placing the text of the include file
at the place you called "include()" so I think there's no reason why it
should be quicker or slower...
Edward
Hi, is create function slow? Or has it a very significant slowdown compared
to an include?
i might want
maybe you can try something like this...
$r1 = "game1"
$r2 = "game16";
echo "";
echo "$teams[$r1]";
echo "$teams[$r2]";
echo "";
Greets,
Edward
> I keep getting parse error with this code:
> ($teams[] is a big array that I got by using mysql_fetch_array)
>
>
>$r = "game";
>
try something like this:
check 1
check 2
check 3
check 4
check 5
that should do it...
Edward
- Original Message -
From: "Scott Saraniero" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 3:17 PM
Subject: [PHP] Sending Form Arrays
> Hi,
>
> I have a form
Hi,
I've asked this question before, but no answer... so here it is again:
does anyone now how I can get the dimensions (width, height) of an mpeg
file? maybe via a unix command... (because in the PHP manual, I can't find
anything about it, and I'm not that much of a unix-guru...)...
thanks,
E
button to Query Pages
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Edward van Bilderbeek - Bean IT blurted
> > Hi,
> >
> > a possible solution is also to provide the backbutton href with the
original
> > variable values...
Hi,
a possible solution is also to provide the backbutton href with the original
variable values...
print "back\n";
Greets,
Edward
- Original Message -
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 9:57 AM
Subject: Re: [PHP] Back button
Or, if you've already set your massive list of variables...:
$varname = "nr".rand(0, $n);
print ${$varname};
- Original Message -
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "Tauntz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 27, 2002 8:15 PM
Subject: Re: [PHP] a q
Hi,
I want to know the dimensions (width, height) of an mpeg / avi / mov file...
does anyone know how I can arrange that with PHP or possibly via a UNIX
command string?
Greets,
Edward
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
65 matches
Mail list logo