';
}
return $plantRow;
-}
\ No newline at end of file
+}
+
+/***
+ *
+ * function retrieves an array of images from the db
+ *
+ * @param PDO $db
+ * @return array
+ */
+
+function getImage(PDO $db): array
+{
+ $sql = $db->prepare('SELECT `identification_image` FROM `Plants` GROUP BY `id` ASC;');
+
+ $sql->execute();
+
+ $images = $sql->fetchAll();
+
+ return $images;
+}
+
+/***
+ *
+ * function checks if data retrieved from the db is
+ * an indexed array and wraps it in a div that can
+ * be displayed
+ *
+ * @param array $images
+ * @return string
+ */
+
+function displayImage(array $images): string {
+
+ if (array_keys($images) !== range(0, count($images) - 1))
+ return false;
+
+
+ $plantImage = '';
+
+ foreach ($images as $image) {
+ $plantImage .= '
';
+ }
+ return $plantImage;
+}
+
+/***
+ *
+ * function retrieves an array if id's from the database
+ *
+ * @param PDO $db
+ * @return array
+ */
+
+function getID(PDO $db)
+{
+ $sql = $db->prepare('SELECT `id` FROM `Plants` GROUP BY `id` ASC;');
+
+ $sql->execute();
+
+ $ids = $sql->fetchAll();
+
+ return $ids;
+}
+
+/***
+ *
+ * function checks if data retrieved from db is
+ * an indexed array and wraps it so that it can be displayed
+ *
+ * @param array $ids
+ * @return string
+ */
+
+function displayID(array $ids): string {
+
+ if (array_keys($ids) !== range(0, count($ids) - 1))
+ return false;
+
+ $plantId = '';
+
+ foreach ($ids as $id) {
+ $plantId .= '