<p>This is a <b>bold</b> text.</p>
<strong> - Important text // Has semantic meaning
<p>This is an <strong>important</strong> point to remember.</p>
<i> - Italic text
<p>This is <i>italic</i> text.</p>
<em> - Emphasized text // Has semantic meaning
<p>This is <em>emphasized</em> text.</p>
<mark> - Marked text
<p>Please <mark>review</mark> the important points in the document.</p>
<small> - Smaller text
<p>This is some <small>additional information</small> about the topic.</p>
<del> - Deleted text
<p>I changed my mind and <del>don't</del> want to go to the party.</p>
<ins> - Inserted text
<p>I <ins>really</ins> enjoyed the movie.</p>
<sub> - Subscript text
<p>H2O is the chemical formula for water, where 2 is written as H<sub>2</sub>O.</p>
<sup> - Superscript text
<p>The area of a circle is calculated using the formula A = πr<sup>2</sup>.</p>
<s> - Strikethrough
<p>This product is currently <s>out of stock</s>.</p>
<u> - Underline:
<p><u>This text is underlined.</u></p>
<br> - Break
<p>This is the first line.<br>This is the second line.</p>
<pre> - Preformatted:
<pre>
function sayHello() {
console.log("Hello, world!");
}
</pre>
Summary of semantical meaning tags:
Tags with Semantic Meaning:
<strong>
<em>
Tags without Semantic Meaning:
<b>
<I>
<mark>
<small>
<del>
<ins>
<sub>
<sup>
<s>
<u>
<be>
<pre>
scp <file> <username>@<IP address or hostname>:<Destination>
The -r (recursive) option means to copy the whole folder and any sub-folders. You can also copy files the other way:
scp -r <file> OR <Folder> @IP address :<Destination>
scp file.txt remote_username@10.10.0.2:/remote/directory
The scp command syntax take the following form:
scp [OPTION] [user@]SRC_HOST:]file1 [user@]DEST_HOST:]file2
OPTION - scp options such as cipher, ssh configuration, ssh port, limit, recursive copy …etc.
[user@]SRC_HOST:]file1
- Source file.
[user@]DEST_HOST:]file2
- Destination file
scp provides a number of options that control every aspect of its behavior. The most widely used options are:
-P
- Specifies the remote host ssh port.
-p
- Preserves files modification and access times.
-q
- Use this option if you want to suppress the progress meter and non-error messages.
-C
- This option forces scp to compresses the data as it is sent to the destination machine.
-r
- This option tells scp to copy directories recursively.<?php
$a=array("red","green","blue","yellow","brown");
print_r(array_slice($a,2));
?>
$str = " Hello World! ";
echo "Without trim: " . $str;
echo "<br>";
echo "With trim: " . trim($str);
The HTML output of the code above will be (View Source):
<!DOCTYPE html>
<html>
<body>
Without trim: Hello World!
With trim: Hello World!
</body>
</html>
The browser output of the code above will be:Without trim: Hello World!
With trim: Hello World!
echo substr("Hello world",6);
Using the start parameter with different positive and negative numbers:
// Positive numbers:
echo substr("Hello world",10)."<br>"; //d
echo substr("Hello world",1)."<br>"; //ello world
echo substr("Hello world",3)."<br>"; //lo world
echo substr("Hello world",7)."<br>"; //orld
echo "<br>";
// Negative numbers:
echo substr("Hello world",-1)."<br>"; //d
echo substr("Hello world",-10)."<br>"; //ello world
echo substr("Hello world",-8)."<br>"; //lo world
echo substr("Hello world",-4)."<br>"; //orld
Using the start and length parameters with different positive and negative numbers:
// Positive numbers:
echo substr("Hello world",0,10)."<br>"; //Hello worl
echo substr("Hello world",1,8)."<br>"; //ello wor
echo substr("Hello world",0,5)."<br>"; //Hello
echo substr("Hello world",6,6)."<br>"; //world
echo "<br>";
// Negative numbers:
echo substr("Hello world",0,-1)."<br>"; //Hello worl
echo substr("Hello world",-10,-2)."<br>"; //ello wor
echo substr("Hello world",0,-6)."<br>"; //Hello
// Interesting example about if-elseif-else statement
$test = "STRING, NOT INTEGER OR FLOAT";
if ($test < 12) {
echo "child";
} else if ($test > 12 && $test < 18 ) {
echo "teen";
} else {
echo "adult";
}
// what do you think, what will be output, error or ?
// make that example on your PC if you are a begginer :)
for (init counter; test counter; increment counter) {
code to be executed for each iteration;
}
The PHP while Loop
The while loop executes a block of code as long as the specified condition is true.
Syntax
while (condition is true) {
code to be executed;
}
`