By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,215 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,215 IT Pros & Developers. It's quick & easy.

Ok, this will sound lazy....

P: n/a
dba
but I have googled.... without success

what does the following mean

if ($variable == "") This means if (variable equals null then next line?
{$variable ='%';} what does this line mean?
Feb 19 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Feb 19, 6:36 pm, dba <d...@somewhere.orgwrote:
but I have googled.... without success

what does the following mean

if ($variable == "") This means if (variable equals null then next line?
{$variable ='%';} what does this line mean?
if $variable is an empty string, than set $variable to % (the
character).
Feb 19 '08 #2

P: n/a
Greetings, ELINTPimp.
In reply to Your message dated Wednesday, February 20, 2008, 02:53:27,
On Feb 19, 6:36 pm, dba <d...@somewhere.orgwrote:
>but I have googled.... without success

what does the following mean

if ($variable == "") This means if (variable equals null then next line?
{$variable ='%';} what does this line mean?
if $variable is an empty string, than set $variable to % (the
character).
Or evaluates to empty string (i.e. false)
testcase:

<?php

$var = false;

if($var == "")
{
echo "true\n";
}

?>
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Feb 20 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.