Ok, this will sound lazy....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dba

    Ok, this will sound lazy....

    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?
  • ELINTPimp

    #2
    Re: Ok, this will sound lazy....

    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).

    Comment

    • AnrDaemon

      #3
      Re: Ok, this will sound lazy....

      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 <anrdaemon@free mail.ru>

      Comment

      Working...