A section of PHP code!

Source: Internet
Author: User
if (Is_array ($today)): $i = 0; $__list__ = $today, if (count ($__list__) ==0): Echo "", Else:foreach ($__list__ as $key + $vo): + + $i; $mod = ($i% 2)
?>

What is the code above? ":" What is the symbol? Understand the great God under the detailed explanation!


Reply to discussion (solution)

It is estimated that your framework program replaced the curly braces {} with: Take a closer look at your configuration file

It is estimated that your framework program replaced the curly braces {} with: Take a closer look at your configuration file


That's all I can see! Can this be achieved?

That's all I can see! Can this be achieved?


I don't know, you run the next test, you can't change the curly braces {}


That's all I can see! Can this be achieved?


I don't know, you run the next test, you can't change the curly braces {}



These are compiled cache files are displayed, generally compiled cache files are final, unexpectedly used ":" Unless PHP support this thing!

There are two syntactic constructs for PHP process control. A curly brace represents a statement block, a colon that represents a statement block.
Curly braces indicate that the statement block is used more, and this is not said.
Use the colon ":" Instead of the curly brace "{" On the left, use endif, Endwhile, endfor;, Endforeach, and endswitch; to replace the curly brace "}" on the right.

For example, the following two procedures are the same

$a =1; $b =2;if ($a = = $b) {    echo ' a=b ';} else{    echo ' a!=b ';}


$a =1; $b =2;if ($a = = $b)    : Echo ' a=b '; else    : Echo ' a!=b '; endif

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.