List Info

Thread: note 76033 added to control-structures.elseif




note 76033 added to control-structures.elseif
user name
2007-06-27 04:24:45
Dont be so stupid (like me) to add a ';' after the elseif,
as it will give unexpected results:

<?php
/* this will output 'ab' in php4.3 */
$c=5;

if ($c>3)
{
  echo 'a';
}
elseif($c>6);
{
  echo 'b';
}
?>
----
Server IP: 194.109.193.76
Probable Submitter: 137.224.252.10
----
Manual Page -- http://www.php.net/manual/en/control-structures.elseif
.php
Edit        -- https://master
.php.net/note/edit/76033
Del: integrated  -- h
ttps://master.php.net/note/delete/76033/integrated
Del: useless     -- http
s://master.php.net/note/delete/76033/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/76033/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/76033/spam
Del: non-english -- 
https://master.php.net/note/delete/76033/non-english
Del: in docs     -- http
s://master.php.net/note/delete/76033/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/76033
Reject      -- https://mast
er.php.net/note/reject/76033
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )