/
Lvl1PlantDisplay.php
49 lines (38 loc) · 1.22 KB
/
Lvl1PlantDisplay.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
<?php
/** contains a single function to return an html string with data put into it */
include "printImage.php";
/** takes a 1d array of plant characteristics and returns a string that contains html figures with the data input
* This string can then be displayed in a nice way
*/
function Lvl1PlantDisplay($arr){
$latinName = $arr[0];
$plantName = $arr[1];
//$image = $arr[];
$family = $arr[4];
$growthForm = $arr[3];
$bloomTime = $arr[6];
$wetlandStatus = $arr[10];
$endangered = $arr[11];
//$src = "images/$latinName.jpg";
$srcString = printImage($latinName);
return "
<table color= black>
<tr>
<td height='10' colspan='3'><center>$plantName</center></td>
</tr>
<tr>
<td height='120' width='120'><img width='100%' height='100%' src='$srcString' alt='er2ror'></td>
<td padding-left = none>
<ul style='list-style-type:none'>
<li>Latin Name: $latinName</li>
<li>Family: $family</li>
<li>Growth Form: $growthForm</li>
<li>Bloom Time: $bloomTime</li>
<li>Wetland Status:$wetlandStatus</li>
<li>Endangered: $endangered</li>
</ul>
</td>
</tr>
</table>";
}
?>