-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
57 lines (53 loc) · 1.05 KB
/
index.php
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
55
56
57
<?php
$pagetitle = "Home";
include 'includes/header.php';
?>
<hr>
<h3><?=$pagetitle?></h3>
<hr>
<ol>
<li>
<br>
<p>str_replace('foo','bar',$str);</p>
<br>
</li>
<li>
<br>
<p>$url_segments = explode('/', $page_url); // return array</p>
<br>
</li>
<li>
<br>
<p>
$sql = 'select * from users where username = :username';
$params[':username'] = 'Joe';
$rows = $this->model->query_bind($sql, $params,'array'); // array or object
</p>
<br>
</li>
<li>
<br>
<p>
60 seconds * 60 minutes * 24 hours in a day = 86400 seconds in a day
</p>
<br>
</li>
<li> Spaceship Operator
<br>
<pre>
// Integers
print (1 <=> 1); // 0
print (1 <=> 2); // -1
print (2 <=> 1); // 1
// Floats
print (1.5 <=> 1.5); // 0
print (1.5 <=> 2.5); // -1
print (2.5 <=> 1.5); // 1
// Strings
print ("a" <=> "a"); // 0
print ("a" <=> "b"); // -1
</pre>
<br>
</li>
</ol>
<?php include 'includes/footer.php'; ?>