-
Notifications
You must be signed in to change notification settings - Fork 0
/
ksort.php
43 lines (42 loc) · 1.25 KB
/
ksort.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
<!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>Ksort function</title>
<style>
<!--
body{
font-family: Verdana,Arial,Helvetica, sans-serif;
font-weight: normal;
background-color: #dddddd;
}
-->
</style>
</head>
<body>
<?php
echo "Best IT Jobs 2021 in no particular order";
echo"<p>";
$IT_Proffessions = array("5"=>"Mobile application developer","3"=>"Information Security Analyst","6"=>"Web Developer","2"=>"Cloud Solutions Architect","1"=>"Data Scientist","4"=>"Data Scientist","7"=>"Network Engineer");
ksort($IT_Proffessions);
foreach($IT_Proffessions as $key => $val){
echo "$key = $val\n";
echo "<br>";
}
?>
<p>
<?php
echo "Fruits likely to be found in a grocery";
echo "<p>";
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
ksort($fruits);
foreach ($fruits as $key=> $val){
echo "$key = $val\n";
echo "<br>";
}
?>
</p>
</body>
</html>