List Info

Thread: note 78358 added to language.operators




note 78358 added to language.operators
user name
2007-10-08 08:42:35
This is very common problem: set one variable to another, if
it is not empty. If it is, set it to something else.
For example: set $bar to $foo, if $foo is empty, set $bar to
"undefined";

if(!empty($foo)) $bar= $foo; else $bar=
"undefined";

OR operator can shorten it:

$bar= $foo or $bar= "undefined";
----
Server IP: 147.32.160.17
Probable Submitter: 81.2.196.33
----
Manual Page -- h
ttp://www.php.net/manual/en/language.operators.php
Edit        -- https://master
.php.net/note/edit/78358
Del: integrated  -- h
ttps://master.php.net/note/delete/78358/integrated
Del: useless     -- http
s://master.php.net/note/delete/78358/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78358/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78358/spam
Del: non-english -- 
https://master.php.net/note/delete/78358/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78358/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78358
Reject      -- https://mast
er.php.net/note/reject/78358
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 )