On September 9, 2002 03:38, Meltem Demirkus wrote:
> Hi,
>
> I want to add one integer to the end of another , which function can I
> use?..
Hi Meltem,
You can use the concatenation operator (.)
Cheers!
--zak
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey John,
Actually, you don't seem to far off. You can use a string as a variable name
by enclosing the string in ${ }.
i.e: ${"foo"}
You should be able to write your loop as something like:
foreach($item as $value) {
// do some stuff
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 11, 2002 14:12, Christian Ista wrote:
> Hello,
>
> A query return x rows, by rows there are 4 fields. I'd like to put the
> result in an array, a 2 dimensions array. Could you tell me how to do
> that ?
Something like this may work for
---+
| contract | amount |
+--+-+
| Jillco | 100 |
| Jackco | 1 |
| ChrisInc |NULL |
+--+-+
The the following select:
SELECT contract, IFNULL(amount, "Fee Based") amount FROM contracts;
will return:
Jillco
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Here is a quick replacement script* for ucwords() that can be made to handle
accented characters or interesting casing rules. It is a bit uppercase happy
- - uppercasing any letter that comes after a non-letter character.
*(Taken from the PHP Funct
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 11, 2002 15:05, Christian Ista wrote:
> > while( $temp = mysql_fetch_row($mysql_result_handle) ) {
> > $array[] = array(
> > 'key0' = array(
> > 'keya' => $temp[0],
> > 'keyb' => $te
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 11, 2002 15:21, Christian Ista wrote:
> > while( $temp = mysql_fetch_row($mysql_result_handle) ) {
> > $array[] = array(
> > 'key0' => array(
> > 'keya' => $temp[0],
> > 'keyb' => $t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 11, 2002 15:57, Kevin Stone wrote:
> Really quick question. Will "return" break a loop inside a function?
>
> Example..
> myfunc()
> {
> while($val=0)
> {
> if ($i=128)
> {
> return true; //<-break or
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 11, 2002 16:31, Jason Caldwell wrote:
> I need to extract the numbers only from a field.
>
> For example: I have an AMOUNT field and so that I can filter out any user
> typo's I would like to extract the numbers only.
>
> If the user ent
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 12, 2002 00:56, Christian Ista wrote:
> > array(
> > array( $temp[0], $temp[1] ),
> > array( $temp[1], $temp[2] )
> > )
>
> I thinks it's not the right way.
>
> I have a query, this query can return 1,5,20, 200, ... rows, each
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 12, 2002 01:55, Christian Ista wrote:
> > $result = mysql_query(...);
> > while( $t = mysql_fetch_row($result) ){
> > $array[] = $t;
> > }
>
> No. I need a 2 dimensions arrays, each line of this array, is the result
> of one row
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On September 12, 2002 09:47, Magnus Solvang wrote:
> I'm used to the unless-statement in perl... How do I do this:
>
> if string A or B are NOT in string C, then do something and quit.
>
> In perl, I would do this:
>
> unless ($c =~ /$a|$b/) {
> b
Hello Jocelyn and Steven,
Could either or both of you submit a bug report at http://bugs.php.net/? If
you follow the instructions there, it will greatly help us in tracking down
the issue!
Cheers!
Zak Greant
PHP QA Team
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Are you still encountering the error? I don't see it.
--zak
- Original Message -
From: "Yasuo Ohgaki" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 07, 2001 8:06 PM
Subject: [PHP-QA] Error in www.php.net (To site admin)
> There is a error on w
Hello All,
Could someone with the needed karma please change my email address in the
cvsusers file from [EMAIL PROTECTED] to [EMAIL PROTECTED]
Thank you!
--zak
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROT
Set the auto_append_file or auto_prepend_file in the php.ini file.
See http://www.php.net/manual/en/configuration.php for more details
--zak
- Original Message -
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 11:50 AM
Subject: [PHP]
Nick Davies wrote:
> Why does this work :
>
> $categorySplit = split(",", $row['category']);
>
> while (list($key, $value) = each ( $categorySplit )) {
> $categoryArray["$value"] = 1;
> }
>
> But this not :
>
> while (list($key, $value) = each ( split(",", $row['category']) )) {
> $categoryArray[
Use the nl2br() function
--zak
- Original Message -
From: "Mike Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 8:11 AM
Subject: [PHP] PHP using Forms
> Hello,
> I have a form field COLS=40>
> with this data in it:
>
> My Home
> 11 North 5th St
> St. P
You may want to try Xitami (www.imatix.com) as a fast/free/open source
alternative to the Microsoft products.
--zak
- Original Message -
From: "Thomas Edison Jr." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 06, 2001 12:52 AM
Subject: [PHP] IIS instead of PWS!!! what el
IIRC, it can with some caveats - check the library at xitami.com
--zak
- Original Message -
From: "Thomas Edison Jr." <[EMAIL PROTECTED]>
To: "Zak Greant" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, May 06, 2001 1:05 AM
Subject: Re:
Change the permissions of the /etc/passwd file, use safe mode or suExec
--zak
- Original Message -
From: "php" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 06, 2001 11:14 PM
Subject: [PHP] files
>
> Good day to you all
>
> How can I keep php scripts from reading th
The file is likely uuencoded, AFAIK PHP does not have a built-in function to
handle this. IIRC there is a function on http://px.sklar.com/ that does
this.
--zak
- Original Message -
From: "~~~i LeoNid ~~" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 12:06 AM
Su
Dmitri Zasypkin wrote:
> Hi,
>
> Could anyone help me with altering PHP sources? Or tell me please where
> may I ask this question?
>
> The problem is when PHP handles a POST request of a known Content-type
> (e.g. x-www-form-urlencoded), it leaves $HTTP_RAW_POST_DATA blank. I
> need to alter the
1 7:15 AM
Subject: Re: [PHP] HTTP_RAW_POST_DATA
> Zak,
>
> Thank you for the answer. Are you sure $HTTP_POST_VARS will be still set
after
> that modification in case of a valid x-www-form-urlencoded POST request?
I'm
> afraid they won't.. Such side effect is very undesirable for me.
>
Use unpack():
// Grab as many signed 32-bit integers as possible
$array = unpack ('l*', $data);
--zak
- Original Message -
From: "Siegfried Kettlitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 12:36 PM
Subject: [PHP] Converting a binary integer to a number
You are going to need Javascript to do this.
--zak
- Original Message -
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 5:19 PM
Subject: [PHP] Refreshing multiple frames?
> Hello,
>
> I am using php with frames for a menu
Use fopen() or file()
--zak
- Original Message -
From: "Dexter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 4:27 PM
Subject: [PHP] How to read a web page and analyze but not display it
hi PHP 'sters,
How to read a web page and analyze but not display it u
Try using unpack()
--zak
- Original Message -
From: "Chris Mattmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 10, 2001 2:54 PM
Subject: [PHP] Binary Data File reading
> Hi there-
>
> Does anyone have any clue as to what may be causing this problem.
I am
Use an auto_increment field.
ie.
create table foo (
id mediumint unsigned not null auto_increment primary key,
namechar (16) not null,
...
)
--zak
- Original Message -
From: "Reuben D Budiardja" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 10,
class_exists()
--zak
- Original Message -
From: "rodrigo" <[EMAIL PROTECTED]>
To: "php php" <[EMAIL PROTECTED]>
Sent: Saturday, May 12, 2001 7:56 PM
Subject: [PHP] Making sure a class is declared only once
> Someone on the list mentioned a way to check if a classed is already
> declar
Or just use a simple chain of if statements :)
if ($num >= 200 && $num <= 299) {
echo "$num is between 200 and 299";
} else if ($num >=1000 && $num <= 2263) {
echo "$num is between 1000 and 2263";
} else if ($num >=2264 && $num <= 2499) {
echo "$num is between 2264 and 2499";
} else {
MaD dUCK wrote:
> also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600):
> > Or just use a simple chain of if statements :)
>
> yeah, but that's so O(n) !
> i can do in O(lg n)
> or, given n CREW processors, in O(1) time!
>
> yes, i have just fini
$playerdata = unpack('czero/A'.$length.'one/itwo/fthree/A*four', $rest);
Good Luck!
--Zak
- Original Message -
From: "Craig Vincent" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 20, 2001 4:00 AM
Subject: [PHP] Problem using unpack
> I'm current trying to use PHP's unp
Manuel wrote:
[...]
> Since Zeev and Andi seem to be currently the most capable developers to
bring
> multi-threading capability to PHP because they developed PHP current
engine
> - Zend, my question still goes for them. After all they always seemed
more
> reasonable and opened to my suggestions
Ensure that the user that PHP is running as has permissions to read the
file.
--zak
- Original Message -
From: "Jon A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 21, 2001 10:36 AM
Subject: [PHP] ftp_put
> Hi, all.
>
> I try to do a file upload using the ftp_put funct
Read the entry on the mail function in the manual:
http://www.php.net/manual/fr/function.mail.php
--zak
- Original Message -
From: "Jean-Arthur Silve" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 2:26 AM
Subject: [PHP] returned eMails
Hi !
We have a site whi
Sounds like you are trying to implode a non-existant array.
Change your code to handle an empty or missing array.
ie.
- Original Message -
From: "Martin Cabrera Diaubalick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 2:41 AM
Subject: [PHP] All of a sudden I
> ie.
Oops! Hit the right keys at the wrong time! :)
if (! count ($array_id))
{
echo '$array_id is empty or not set.';
}
else if (1 == count($array_id))
{
$string_id=$array_id;
}
else
{
$string_id= implode(":",$array_id);
}
--zak
--
PHP General Mailing List (http://www.php.net/)
To
Hi Jon,
Dealing with expiry dates and cookies is often a PITA!
Rasmus suggested a way around this a few weeks ago - here is a rehash of
what he said:
Do this:
setcookie ('expiry', time ());
This call will have created a session cookie - this means that the session
will expire when the browser
Use PHP's include() function. See the online manual for details.
--zak
- Original Message -
From: "Shashwat" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 4:07 AM
Subject: [PHP] PHP AND SSI
> How can I run SSI commands like etc. in
PHP
> files... as ASP
-zak
--
__ ___ ___ __
/ |/ /_ __/ __/ __ \/ / Zak Greant <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Advocate
/_/ /_/\_, /___/\___\_\___/ Calgary, Canada
<___/ www.mysql.com 403.244.7213
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
On Sun, 2002-03-03 at 20:31, Martin Towell wrote:
> 1) not unless you have them opening up a new window for each form
> 2) combine them into one form
Also, this topic is covered quite often on this list. Check the
list archives for the various solutions people have used.
http://php.net/sup
On March 25, 2002 01:50, you wrote:
> HI,
>
> I have a functino write in c, like as:
>
> void addvalue ( int a, int b, int *c )
> {
> *c = a + b;
> }
>
>in php
>
>
> phpinclude ("alexlib");
> addvalue ( 1, 2, c );
> print ( "Value c = $c ");
>
> ?>
>
> what the procedu
On March 31, 2002 04:39, Alberto Wagner wrote:
> Why everyone uses $foo or $foobar as examples?
http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=foo
--zak
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Richard,
You are replacing the placeholders in $mail_template, but you are storing
the results in $mail_content.
> $mail_content = str_replace('##fullname##',$fullname,$mail_template);
> $mail_content = str_replace('##email##',$email,$mail_template);
This means that each time you call the st
Write your code to a temporary file, include the file and then delete it.
";
// Create a temporary file to store the code
$file = tempnam ('/tmp', 'eval');
error_log ($code, 3, $file);
// include the temp file
include ($file);
// erase the temp file
unlink ($file);
?>
/* Note - I have not tes
Jason Jacobs wrote:
> Hi all. I'm trying to pass an array to another page, and I'm not having
> luck. I thought maybe it would do something slick by passing it in the
> url, but it doesn't. So, how can I pass the array?
You can pass an array between pages by using the serialize() and
u
This error means that you are using an empty string as your pattern for the
regular expression.
Throw a test like this in before the eregi_replace calls to check if this is
the case:
if ('' === $r[1]) {
echo '$r[1] is an empty string';
} else
if (NULL === $r[1]) {
echo '$r[1] is NULL';
}
Have you defined the 'pi' constant?
If you are trying to use PHP's built-in PI constant, it is named 'M_PI'
Perhaps consider increasing your error reporting level so that PHP reports
problems like undefined constants - see error_reporting() for more details.
--zak
- Original Message -
McShen wrote:
> > hi
> > i have a mysql table with approx. 30 entries.
> >
> > I wanna get them(i know how to do that) and list them in a 2-column
table.
> I
> > have been trying to use a loop to do it. But it will only produce a
> 1-column
> > table. it's like
> >
> > entry 1
> > entey 2
> > entr
Hi Phil,
There are a few options that may meet your needs:
Word2x (http://word2x.alcom.co.uk/)
LAOLA (http://user.cs.tu-berlin.de/~schwartz/pmh/)
Good Luck!!
--zak
- Original Message -
From: "Phil Driscoll" <[EMAIL PROTECTED]>
To: "Justin Farnsworth" <[EMAIL PROTECTED]>
Cc: "p
Richard Kurth wrote:
>
> Question about explode
>
> this work just perfect
>$name="what+ever";
>
> $name1=explode("+",$name);
> $fname=$name1[0] ;this has what
> $lname=$name1[0] ;this has ever
>
> But if I pass the info from another page like this
>
> test
>
> $n
Use nl2br()
--zak
- Original Message -
From: "Joeri Vankelst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 4:16 PM
Subject: [PHP] Enter to BR
> How can I get an Enter typed in a HTML textfield to be inerpreted as a BR
or
> a P tag?
> Someone sugested I use th
Arcady Genkin wrote:
> [message format fixed]
> "..s.c.o.t.t.." <[EMAIL PROTECTED]> writes:
>
> > > I'm trying to send PHP errors into a separate log file. I have the
> > > following in php.ini:
> > >
> > > log_errors = On
> > > error_log = /var/www/logs/php-errors.log
> > >
> > > After apach
rm wrote:
> php3.x
>
> We have a large number of people submitting a large
> number of docs...I'm having a problem with some docs
> coming through with high ascii characters in the text,
> apparently the dbm database we're using chokes on some
> high ascii chars. I need to eliminate characters i
Rick wrote:
[...]
> I'd be interested in some good PHP books as well, I feel like I'm in a
rut.
> At first, PHP was all new, and I was learning s much... but now if I
> think up a task I can visualize how to do it in PHP pretty easily. I know
I
> have a LOT to learn, but I think my problem is
Hi Matthew,
Set your error_reporting level to E_ALL. The parser will then report the use
of undeclared variables.
--zak
- Original Message -
From: "Matthew Aznoe" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 2:22 PM
Subject: [PHP] Variable name declarat
Christopher Ostmo wrote:
> Dr. Evil pressed the little lettered thingies in this order...
>
> >
> > I know that credit cards have standard formats: There's a standard
> > number of digits, and whether the card is Visa, MC, Amex, etc is
> > encoded in the number, and there is some kind of checksum,
list (,$reqmonth) = explode ('-', $row[5]);
--zak
- Original Message -
From: "Adam Plocher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 5:23 PM
Subject: [PHP] explode()
> $reqmonth = ${explode("-",$row[5])}[1];
>
> Is there anyway I can get that to work with
Hi Daniel,
Set short_open_tag = Off in your php.ini file and the problem will go away.
--zak
Rose, Daniel wrote:
> Hi,
> I have looked through the history of the list, and I see that several
people
> have said that PHP fully supports XHTML. I have some problems using XHTML
> with PHP, namely pa
Check the list archives - this question gets posed quite often.
--zak
- Original Message -
From: "Jack" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 1:38 PM
Subject: Re: [PHP] count number of email sent to us
> Yes, that is the point here. We normally use
Both topics are covered frequently :)
--zak
Jack wrote:
> Sorry, It is mistyping here. I mean, we normally use variables from php to
> do something in javascript function. But how could we use value from
> variables in javascript function to do something in php function?
--
PHP General Maili
62 matches
Mail list logo