RE: [PHP] newbie's question

2002-11-15 Thread Van Andel, Robert
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 of testing

RE: [PHP] newbie's question

2002-11-15 Thread Steve Keller
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

RE: [PHP] newbie's question

2002-11-15 Thread Steve Keller
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

RE: [PHP] newbie's question

2002-11-15 Thread Van Andel, Robert
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 there but my

Re: [PHP] newbie's question

2002-11-15 Thread Frank Wang
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 to a

RE: [PHP] Newbie's question about \n

2002-07-22 Thread Niklas Lampén
If you check the source of your code you'll see that in source the text is in two lines. \n doesn't work as br, so this is about how HTML works, not plain text. Niklas -Original Message- From: KK Lee [mailto:[EMAIL PROTECTED]] Sent: 22. heinäkuuta 2002 14:01 To: [EMAIL PROTECTED]

Re: [PHP] Newbie's question about \n

2002-07-22 Thread Tom Rogers
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 !DOCTYPE HTML PUBLIC KL-//W3C//DTD

Re: [PHP] Newbie's question about \n

2002-07-22 Thread Neil Freeman
nl2br() KK Lee wrote: ** This Message Was Virus Checked With : SAVI 3.59 May 2002 Last Updated 8th July 2002 ** Dear ALL, It seems that i

Re: [PHP] Newbie's question about \n

2002-07-22 Thread Anas Mughal
I often use: br\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

Re: [PHP] Newbie's question about \n

2002-07-22 Thread Martin Clifford
Think of it this way: br 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