Hi,
That looks good to me, thanks.
"Steve Keller" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Err... sorry. The logic was there but my fingers got a bit ahead of my
> brain. The check works, but if you want to just check if it's empty turn
> the conditional
Yes it would. I like to make things complicated :)
Robbert van Andel
-Original Message-
From: Steve Keller [mailto:skeller@;healthtvchannel.org]
Sent: Friday, November 15, 2002 5:11 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] newbie's question
Err... sorry. The logic was ther
Err... sorry. The logic was there but my fingers got a bit ahead of my
brain. The check works, but if you want to just check if it's empty turn
the conditional to a negative, like so:
if (!$testVar) {
etc.
}
That makes it "If NOT $testVar"
> I may be crazy, but wouldn't if ($variable) work
At 11/15/2002 06:09 PM, you wrote:
Don't know about a correct way but you can use if(empty($variable))
I may be crazy, but wouldn't if ($variable) work just as well? If the
string is empty it'll return a negatory on that check.
Lemme double check that.
$testVar = "";
if ($testVar) {
echo "
Don't know about a correct way but you can use if(empty($variable))
Robbert van Andel
-Original Message-
From: Frank Wang [mailto:wang960@;yahoo.com]
Sent: Friday, November 15, 2002 7:10 AM
To: [EMAIL PROTECTED]
Subject: [PHP] newbie's question
Hi,
what is the correct way
Hi,
what is the correct way of testing if a string is empty or not?
fw
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Think of it this way: creates a line break in HTML Output, \n creates a line
break in HTML Code.
echo "I really\n like\n PHP!";
HTML Code:
I really
like
PHP!
HTML Output:
I really like PHP!
HTH
>>>It seems that i have a very silly problem.
I can't get the new line escape character to
I often use: \n
That way I get a new line in a browser and plain text as well.
KK Lee <[EMAIL PROTECTED]> wrote: Dear ALL,
It seems that i have a very silly problem.
I can't get the new line escape character to work.
the following is my SIMPLE script and corresponding output.
PHP script:
nl2br()
KK Lee wrote:
> **
> This Message Was Virus Checked With : SAVI 3.59 May 2002
> Last Updated 8th July 2002
> **
>
> Dear ALL,
>
> It seems tha
Hello KK,
Monday, July 22, 2002, 9:00:47 PM, you wrote:
KL> Dear ALL,
KL> It seems that i have a very silly problem.
KL> I can't get the new line escape character to work.
KL> the following is my SIMPLE script and corresponding output.
KL> PHP script:
KL> "-//W3C//DTD HTML 4.0 Transitiona
PROTECTED]
Subject: [PHP] Newbie's question about \n
Dear ALL,
It seems that i have a very silly problem.
I can't get the new line escape character to work.
the following is my SIMPLE script and corresponding output.
PHP script:
http://www.w3.org/TR/html4/loose.dtd"; >
TEST
Dear ALL,
It seems that i have a very silly problem.
I can't get the new line escape character to work.
the following is my SIMPLE script and corresponding output.
PHP script:
http://www.w3.org/TR/html4/loose.dtd"; >
TEST
Output in IE6:
this should be printed out: this is a second
12 matches
Mail list logo