Not Null?

This is a discussion on Not Null? within the PHP General forums, part of the PHP Programming Forums category; Greetings, I have a script that looks for the variable to be NULL and then execute. Is there a way ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-31-2007
Steve Marquez
 
Posts: n/a
Default Not Null?

Greetings,

I have a script that looks for the variable to be NULL and then execute. Is
there a way for the script to look for anything or something in the variable
and then execute?

Ex:

If (Œ$a¹ == Œ ANYTHING¹) {

some action

}else{

some other action

}

Thank you for any help.

--
Steve M.

Reply With Quote
  #2 (permalink)  
Old 10-31-2007
Robin Vickery
 
Posts: n/a
Default Re: [PHP] Not Null?

On 31/10/2007, Steve Marquez <smarquez@marquez-design.com> wrote:
> Greetings,
>
> I have a script that looks for the variable to be NULL and then execute. Is
> there a way for the script to look for anything or something in the variable
> and then execute?
>
> Ex:
>
> If (Œ$a¹ == Œ ANYTHING¹) {


oh dear, krazee quotes... at least I presume that's what those wierd
characters are.

Look in the manual for isset() (http://www.php.net/isset) and empty()
(http://www.php.net/empty).

-robin
Reply With Quote
  #3 (permalink)  
Old 10-31-2007
Zoltán Németh
 
Posts: n/a
Default Re: [PHP] Not Null?

2007. 10. 31, szerda keltezéssel 10.48-kor Steve Marquez ezt Ã*rta:
> Greetings,
>
> I have a script that looks for the variable to be NULL and then execute. Is
> there a way for the script to look for anything or something in the variable
> and then execute?
>
> Ex:
>
> If (Œ$a¹ == Œ ANYTHING¹) {
>
> some action
>
> }else{
>
> some other action
>
> }


try isset($a)

greets
Zoltán Németh

>
> Thank you for any help.
>
> --
> Steve M.

Reply With Quote
  #4 (permalink)  
Old 10-31-2007
Daniel Brown
 
Posts: n/a
Default Re: [PHP] Not Null?

On 10/31/07, Robin Vickery <robinv@gmail.com> wrote:
> On 31/10/2007, Steve Marquez <smarquez@marquez-design.com> wrote:
> > Greetings,
> >
> > I have a script that looks for the variable to be NULL and then execute.. Is
> > there a way for the script to look for anything or something in the variable
> > and then execute?
> >
> > Ex:
> >
> > If (Œ$a¹ == Œ ANYTHING¹) {

>
> oh dear, krazee quotes... at least I presume that's what those wierd
> characters are.
>
> Look in the manual for isset() (http://www.php.net/isset) and empty()
> (http://www.php.net/empty).
>
> -robin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Robin, I think you hit it exactly on the head with the quote issue.

Steve, use regular single or double quotes, not any kind of fancy
quotes or backticks. It may be the editor you're using: if you use
Microsoft Word or another similar word processor, it may replace the
quotes with something it things is "prettier". If you're using
Windows, use notepad, `edit.com` from the command line, or download
any IDE you'd like - many or which are free and open source, and even
handle PHP specifically.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day. Then you'll find out he was
allergic and is hospitalized. See? No good deed goes unpunished....
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0