First, preface
The reason for doing this is because the two functions are very similar in that they are converting strings into groups.
Second, explode
As can be seen from the following example, the resulting array is in the corresponding order.
$pizza = "Piece1 piece2 piece3 piece4 piece5 piece6"; $pieces = Explode ("", $pizza); Echo $pieces [0]; Piece1echo $pieces [1]; PIECE2//Example 2$data = "foo:*:102
. For example:
Char SQL [256];
Sprintf (SQL, "select * from table where no = '% s'", bankno );
Its function is to assign the statements in "" to the variable SQL.
Strtolower
Strtoupper
Ucwords
Ucfirst
2. string connection and Segmentation
(1) array explode (string input, string separator, int limit)
Use one string to separate another string
// Example 1
$ Pizza = "piece1 piece2 piece3 piece4 piece5 piece6 ";
$ Pieces = explode ("", $
Mysql parent-child structure sorting projects often encounter parent-child structure display problems. different databases have different write methods, such as using with union in SqlServer, while Mysql does not have such convenient statements.
In the following category table, foods include pizaa, buger, and coffee, while pizza is divided into several types of cheese. how can they express their parent-child structure?
CREATE TABLE category(id INT(10
Mysql parent-child structure sorting projects often encounter parent-child structure display problems. different databases have different write methods, such as using with union in SqlServer, while Mysql does not have such convenient statements.
In the following category table, foods include pizaa, buger, and coffee, while pizza is divided into several types of cheese. how can they express their parent-child structure?
CREATE TABLE category( id IN
difference in the store, hey. I think the main reason is that there is a lot of sauce, and there is enough sauce, it will not be difficult to eat. I wanted to scatter cheese powder, that is, the green jar from Pizza Hut. As a result, the sad discovery has expired.1Just now. During my pregnancy, I went to the supermarket downstairs in jiuguang department store to buy it. I only tried it once, and then I kept it in the refrigerator.
The first attempt
Cy is almost her birthday. To avoid being tired of temporary overtime, I asked her to come out for dinner early. We had thai food last year. This year we chose a pizza store that is not Pizza Hut. The food tastes good, and the restaurant environment is also suitable for chatting. In short, I am very satisfied. I don't know if she is satisfied or not?
I noticed that she was dressed up today, with a thin f
");$onlyconsonants = Str_replace ($vowels, "", "Hello World of PHP");
Provides:you should eat pizza, beer, and ice cream every day$phrase = "You should eat fruits, vegetables, and fiber every day.";$healthy = Array ("Fruits", "vegetables", "fiber");$yummy = Array ("Pizza", "beer", "ice Cream");
$newphrase = Str_replace ($healthy, $yummy, $phrase);
Use of the Count parameter is available as of PHP 5.0.0$str
SUBSTR (str,start,length);
Example: substr (' PHP tutorial is very good language ', 4,5);
The output is the is ve;
When the length of the START>STR, it is returned as ();
substr (' PHP is very good language ', 26,5);
substr (' PHP is very good language ', 4);
Output as (blank)
Output is V (indicates start and langth are 4)
When start is negative, start reading from the end of STR (* This is read from 1 instead of starting at 0).
substr (' PHP is very good language ', -4,5);
Output is Uage
When
implode () can receive two parameter sequences, explode () cannot. You must ensure that the separator parameter is prior to the string parameter.
Note: When constructing an SQL statement, the query column can be written in this way.Php code$ Field = explode (':', '*'); // The usage of explode is unknown today.
Official demo:Php code
// Example 1$ Pizza = "piece1 piece2 piece3 piece4 piece5 piece6 ";$ Pieces = explode ("", $
The syntax analyzer describes the syntax structure of a sentence to help other applications to reason. Natural Language introduces many unexpected ambiguities, which can be quickly discovered by our understanding of the world. Here is an example that I like very much:
They ate the pizza with anchovies
The correct resolution is to connect "with" and "pizza", and the wrong Resolution Associates "with" and "e
: stu1103Dictionary nesting
The dictionary key value can be nested with numbers, lists, and dictionaries. Similarly, there are also list nesting. I am talking about nesting dictionaries in the list. The key to the specific nested data type is to grasp the characteristics of the list and dictionary. For the list, the element description in the list should correspond to the same attribute. For example, to describe the pizza dictionary, the
(); $.when( d1, d2 ).done(function ( v1, v2 ) { console.log( v1 ); // "Fish" console.log( v2 ); // "Pizza"}); d1.resolve( "Fish" );d2.resolve( "Pizza" );
(8) deferred. then (doneFilter [, failFilter] [, progressFilter]) -- when the Deferred (latency) object is resolved, rejected, or still in progress, add a handler is called.
Parameters:
DoneFilter -- type (Function), a Function called when the Deferred
Substr (str, start, length );
Example: substr ('php tutorial is very good language );
Output is ve;
If the length of start> str is returned ();
Substr ('php is very good language );
Substr ('php is very good language ', 4 );
Output as (blank)
Output is v (both start and langth are 4)
When start is a negative value, it starts to read from the end of str (* at this time, it starts to read from-1 rather than from 0 ),
Substr ('php is very good language );
Output as uage
When the value of length is
5.4 JCheckBox class
The JCheckBox class indicates switching components. By default, this component displays a check box icon near the text label for two status options. The check box uses an optional check mark to display the current status of the object, rather than holding the button down for example, JToggleButton. For JCheckBox, the icon displays the object status, while for JToggleButton, the icon is part of the label and is not usually used to display the status information. The two compon
default) character ("" by default). This function returns a new string without modifying the original string.Example #1 chunk_split ()
The Code is as follows:
Copy code
// Format $ data using RFC 2045 syntax$ New_string = chunk_split (base64_encode ($ data ));?>
Explode-use one string to separate another string
Example #1 explode () Example
The Code is as follows:
Copy code
// Example 1$ Pizza
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.