This article mainly introduces the alternative syntax in PHP, which is a common but important usage in PHP programming, if you need it, you can refer to the alternative syntax. it is a very important concept that is not often seen in PHP programming. Today, this article demonstrates the usage of this concept in the form of instances.
Check the wordpress code, which shows some rare
Alternative syntax in PHP (colon, endif, Endwhile, ENDfor)reprinted October 07, 2012 09:48:10
Label:
PHP/
WordPress/
Html
16096
We often see a lot of strange php syntax in the wordpress template of a blog program, such as:[PHP]View PlainCopy
if (empty ($GET _[' A ')):?>
"Red" > Empty
endif;?>
For a considerable part of the PHP enthusiasts have never seen, what are these things? In fa
We often see a lot of strange php syntax in a wordpress-like blog program template, such as: what syntax in PHP has an alternative syntax? Process Control (including if, while, for, foreach, switch) has alternative syntax for several statements.the basic form of alternative syntax:The left curly brace ({) is replaced by a colon (:) and the right curly brace (}) i
Alternative syntax is an uncommon and sometimes important concept in PHP programming. Today, this article shows the use of this concept in an instance form.
Look at the WordPress code, which can be seen in some rare PHP substitution syntax, as follows:
Many readers will have the question: what is the colon and endif after else? Google a bit to understand that this is the alternative syntax of
The alternative syntax that is not commonly used in PHP process control is used to prepare a wordpress topic. the following syntax is displayed:
__( 'Previous page', 'twentyfifteen' ), 'next_text' => __( 'Next page', 'twentyfifteen' ), 'before_page_number' => '' . __( 'Page', 'tw
The Phper of a blog program like WordPress can see a lot of strange PHP syntax, such as: for a part of Phper have not seen what these things are? Are those blogging developers doing their own scripting language for PHP? not also, in fact these are all PHP syntax, but not commonly used, these are PHP Process control alternative syntax. Here is a detailed look at the alternative syntax for PHP process c
Many of our SEO in the choice to do keyword, have selected several of the industry's hot keyword to compete rankings, this is the right thing to do, but in addition to doing so, is not it also overlooked a number of things, is there any other way to do the ranking, and the optimization of the effort can not optimize the main keyword half? Today's article, obsession will give you a knowledge: the key words of alternative competitive approach. You are w
alternative syntax is an uncommon and sometimes important concept in PHP programming.
Many friends have this question: what does the colon and endif after else mean? Google a bit to understand that this is the PHP alternative syntax.
where the colon (:) equivalent to the left curly brace ({), endif equivalent less right operand curly braces (});
Let me give you an example:
The above statement is equivale
Here is a detailed talk about PHP Process Control alternative syntax. What is an alternative syntax?In short, it is the alternative writing of some grammar.Do the syntax in PHP have alternative syntax?Process Control (including If,while,foreach,switch) These statements have alterna
Today looked at the WordPress code, there are some rare php substitution syntax,
'' . __ (' Pages: ', ' Thebox '), ' after ' => ');?>
What does the colon and endif behind the else represent? Rookie one, have not seen, so Google a bit, just understand that this is the substitution of PHP syntax,
A colon (:) equivalent to a left curly brace ({), endif equivalent Yu Yu curly braces (});
Let's take an example:
It's negative, pull.
The above statement i
This article mainly introduces the alternative syntax in PHP. The alternative syntax in PHP is often used in template code writing. for example, this syntax is widely used in wordpress templates, if you need it, you can refer to today's wordpress code, which contains some rare Alternative php syntax,
The code is as follows:
'. _ ('Pages:', 'thebox'), 'after'
ready to do a wordpress theme, the results see the following syntax: This is to know that PHP has a less common alternative syntax: according to http://www.jb51.net/article/23252.htmis there an alternative syntax for those grammars in PHP?Process Control (including If,while,forforeach,switch) has alternative syntax for several statements. the basic form of
We often see a lot of strange php syntax in a WordPress-Class blog program template, such as: PHP endif;? > For a considerable part of the PHP enthusiasts have never seen, what is these things? Are those blogging developers doing their own PHP template language? Not also. In fact, these are PHP syntax, just not used very often, these are PHP process control of the alternative syntax.Here we give you a specific word on PHP process Control
This article mainly introduces several functions abandoned by jQuery and their substitution functions. we must pay attention to them during project development and share them with you for your reference. Earlier in order to better browser compatibility, has been the use of jQuery-1.7.2 version; but with the rapid development of the major browsers and technology, even the new version of bootstrap is the need to introduce the version of jQuery-1.9 or above, representing the commonly used jQuery-1.
Alternative syntax in PHP
Today I read the wordpress code, which contains some rare alternative php syntax,
'' . __( 'Pages:', 'thebox' ), 'after' => '' ) ); ?>
What do the colons and endif after else represent? I have never met a cainiao, so I just googled it to understand that this is an alternative syntax for php,
Colon (:) is equivalent to left cu
down, it causes syntax errors, so add ";" You can avoid unknown errors.
But sometimes we see other people's libraries or plug-ins that write anonymous functions like this:
+function () {} ();
"+" Here is the operator, the operator has a very high priority, so the right side of the function declaration plus the part of the parentheses (in fact, is the function of the execution of the writing) directly executed. In fact, more than the front can be "+" number, "-", "!" "," ~ "," + +
If Google can't put ads on your website, you can use your advertising space to put in alternative ads. By default, if there are no targeted ads, Google will display public service ads (PSA). By specifying colors, pictures, HTML pages, or selected ad servers, you can ensure that advertising space is always used effectively-either for targeted Google ads or for content you choose. Alternative ads can be desig
The recent Iraq book suddenly received some complaints from foreign users, said the book interface has become Chinese, but their system language is not Chinese, is French Russian and Japanese, the book only supports Chinese and English, in the language does not support the system, it should be automatically selected in English, I do not know why will be selected into Chinese, after arduous and difficult to troubleshoot, Finally found the reason, know the iOS multi-language
Sometimes the assembly has multiple selectable positions and wants to be expressed in the drawing, i.e. an alternative assembly plot.As shown in 1, the assembly handle has two position options.Figure 1If you need to express this alternative assembly in a drawing, you need to first define an "alternative assembly" in the assembly, as shown in 2.Figure 2New member,
used MongoDB, JavaScript, or the experience of building a REST API before, don't worry, these topics will be covered in enough detail, including authentication, building code in multiple files, writing test cases, and more. First, start with the definition of MEAN stack.What is MEAN StackThe MEAN stack can be summarized as:
M = Mongodb/mongoose.js. The popular database for node. JS is an elegant ODM.
E = express.js: A lightweight WEB application framework.
A = Angular.js: A rob
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.