-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrings.php
More file actions
54 lines (42 loc) · 1.13 KB
/
Copy pathstrings.php
File metadata and controls
54 lines (42 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$value= 31;
$hello = 'Joel ';
$hello .= 'Martinez';
echo '<p>strings</p>';
echo '<p>this is a string</p>';
echo "<p>String and a value of variable: $value </p>";
echo "<p>String and a value concatenated: " .$value. "</p>";
echo "<p>String and a value concatenated: " .$hello. "</p>";
$greet = function($name) {
printf(strtolower("Hi ". $name));
};
$greet("Joel");
echo "<br/>";
$bye = function($name) {
printf("BYE ". $name);
};
$bye("Joel");
$string = 'repeat string <br/>';
print_r(str_repeat($string, 5));
$lengthString = '<p>Joel Martinez Fañanas </p>';
print_r(strlen($lengthString));
echo ('<br/>');
echo strpos('Hola JOel, Que tal, Bien', 'Yo');
echo ('<br/>');
echo strtoupper('Hola Joel, Que tal, Yo');
echo ('<br/>');
echo strtolower('HELLO JOEL, WCOMO ESTAS');
echo ('<br/>');
echo substr('HELLO Joelito', -5);
?>
</body>
</html>