The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
php if statement
#2
Try something like this:

$a = 1;
$b = 2;
$c = 3;

if ($a == 1) {
if ($b == 2) {
code to be executed
}
if ($c == ($a + $b)) {
code to be executed
}
}

That only works if things are true.
If something is not true and you need out put for it, then add an else clause.
IE:

if ($b == 2) {
code to be executed
} else {
code to be executed if $b != 2 // != means "does not equal"
}
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply


Messages In This Thread
php if statement - by JWH_Matthew - 2010-03-16, 08:20:43
php if statement - by internet54 - 2010-03-16, 08:30:27
php if statement - by JWH_Matthew - 2010-03-16, 10:07:11
php if statement - by internet54 - 2010-03-16, 11:33:59
php if statement - by JWH_Matthew - 2010-03-16, 11:36:51
php if statement - by JWH_Matthew - 2010-03-16, 11:41:19
php if statement - by baris - 2010-03-16, 12:47:39
php if statement - by JWH_Matthew - 2010-03-16, 12:57:00
php if statement - by baris - 2010-03-16, 13:41:06
php if statement - by JWH_Matthew - 2010-03-16, 13:49:48
php if statement - by baris - 2010-03-16, 13:54:07
php if statement - by JWH_Matthew - 2010-03-16, 13:55:46
php if statement - by baris - 2010-03-16, 14:07:58
php if statement - by JWH_Matthew - 2010-03-16, 14:16:23
php if statement - by baris - 2010-03-16, 14:22:28
php if statement - by JWH_Matthew - 2010-03-16, 14:28:02
php if statement - by baris - 2010-03-16, 14:33:56
php if statement - by JWH_Matthew - 2010-03-16, 14:36:54
php if statement - by baris - 2010-03-16, 14:40:45
php if statement - by JWH_Matthew - 2010-03-16, 14:48:33
php if statement - by baris - 2010-03-16, 14:53:53
php if statement - by JWH_Matthew - 2010-03-16, 14:57:58
php if statement - by baris - 2010-03-16, 15:20:10
php if statement - by internet54 - 2010-03-16, 15:24:32
php if statement - by JWH_Matthew - 2010-03-16, 15:38:19
php if statement - by internet54 - 2010-03-16, 15:39:21
php if statement - by JWH_Matthew - 2010-03-16, 15:44:25
php if statement - by Zegnåt - 2010-03-16, 16:45:55
php if statement - by sal - 2010-03-16, 18:59:10
php if statement - by Zegnåt - 2010-03-16, 19:34:52
php if statement - by baris - 2010-03-16, 22:01:18
php if statement - by JWH_Matthew - 2010-03-17, 00:55:03
php if statement - by baris - 2010-03-17, 01:36:18
php if statement - by JWH_Matthew - 2010-03-17, 14:44:58



Users browsing this thread: 9 Guest(s)