Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2007, 12:58 PM
Senior Member
 
Join Date: Mar 2007
Posts: 274
Default if not statement code.

i m looking for a if not statement code.

is this an if not statement:

if!()
{
}
Reply With Quote
  #2 (permalink)  
Old 07-04-2007, 12:59 PM
Senior Member
 
Join Date: Apr 2007
Posts: 347
Default

try this code

Code:
if(!file_exists("foobar"))
{
        mkdir("foobar");
}
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 01:01 PM
Senior Member
 
Join Date: May 2007
Posts: 267
Default

Quote:
Originally Posted by Steve View Post
i m looking for a if not statement code.

is this an if not statement:

if!()
{
}

Just move the ! inside the parentheses, like this

Code:
if(!)
{
}
Reply With Quote
  #4 (permalink)  
Old 07-04-2007, 01:02 PM
Senior Member
 
Join Date: Apr 2007
Posts: 311
Default

use it

Code:
if (!isset($var)) { }

or

if (empty($var)) {}

or

if (!something) {}
Reply With Quote
  #5 (permalink)  
Old 07-04-2007, 01:03 PM
Senior Member
 
Join Date: May 2007
Posts: 290
Default

yes ! shuld be infront and in parentheses. like


if(!$var)

{

do something

}
Reply With Quote
Reply


Thread Tools
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

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



All times are GMT. The time now is 05:00 PM.


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