Conversation
…added headings for data table
test/functionsTest.php
Outdated
| @@ -0,0 +1,11 @@ | |||
| <?php | |||
There was a problem hiding this comment.
I've completed success test, will begin working on failure and malform test.
|
|
||
| function processData(array $plants): string | ||
| { | ||
|
|
| if (array_keys($images) !== range(0, count($images) - 1)) | ||
| return false; | ||
|
|
||
|
|
| function displayImage(array $images): string { | ||
|
|
||
| if (array_keys($images) !== range(0, count($images) - 1)) | ||
| return false; |
There was a problem hiding this comment.
Indent this.
Also, you don't need the curlyboys for a one-liner if statement, but they do help readability.
| <link rel="stylesheet" type="text/css" href="index.css"> | ||
| <link rel="stylesheet" type="text/css" href="normalize.css"> | ||
| <link rel="stylesheet" type="text/css" href="styles/index.css"> | ||
| <link rel="stylesheet" type="text/css" href="styles/normalize.css"> |
There was a problem hiding this comment.
Normalize should come before your own CSS, because the browser will overwrite rules in downwards-order. You want your own rules to override normalize, not the other way around.
| ?> | ||
|
|
||
| <!DOCTYPE html> | ||
| <html lang="eng"> |
index.php
Outdated
| <li>Life Span</li> | ||
| </ul> | ||
| </div> | ||
| <?php echo processData($plants) ?> |
There was a problem hiding this comment.
Charlie advised that the only functionality you should have in php tags within the html body is echoing string variables you already made in the php block. This method call should go up in the php block and load its message into a string, which you then echo here. This keeps your 'doing stuff' code all together.
| } | ||
|
|
||
| .row { | ||
| width: 100%; |
| ul { | ||
| padding-top: 3%; | ||
| border-top: solid black; | ||
| width: 100%; |

.Create and display table