Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sites/intro-to-php/creating_a_data_class.step
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ steps do

source_code :php, <<-PHP
foreach ($topics as $topic) {
echo "<h3>" .$topic['title']. " (ID: " .$topic['id']. ")</h3>";
echo "<h3>{$topic['title']} (ID: {$topic['id']})</h3>";
echo "<p>";
echo nl2br($topic['description']);
echo "</p>";
Expand Down
8 changes: 4 additions & 4 deletions sites/intro-to-php/deleting_topics.step
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ steps do
source_code :php, <<-PHP
<?php
foreach ($topics as $topic) {
echo "<h3>" .$topic['title']. " (ID: " .$topic['id']. ")</h3>";
echo "<h3>{$topic['title']} (ID: {$topic['id']})</h3>";
echo "<p>";
echo nl2br($topic['description']);
echo "</p>";
echo "<p>";
echo "<a href='/edit.php?id=" .$topic['id']. "'>Edit</a>";
echo "<p>"
echo "<a href='/edit.php?id={$topic['id']}'>Edit</a>";
echo " | ";
echo "<a href='/delete.php?id=" .$topic['id']. "'>Delete</a>";
echo "<a href='/delete.php?id={$topic['id']}'>Delete</a>";
echo "</p>";
}
?>
Expand Down
4 changes: 2 additions & 2 deletions sites/intro-to-php/editing_topics.step
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ steps do
source_code :php, <<-PHP
<?php
foreach ($topics as $topic) {
echo "<h3>" .$topic['title']. " (ID: " .$topic['id']. ")</h3>";
echo "<h3>{$topic['title']} (ID: {$topic['id']})</h3>";
echo "<p>";
echo nl2br($topic['description']);
echo "</p>";
echo "<p><a href='/edit.php?id=" .$topic['id']. "'>Edit</a></p>";
echo "<p><a href='/edit.php?id={$topic['id']}'>Edit</a></p>";
}
?>
PHP
Expand Down
12 changes: 6 additions & 6 deletions sites/intro-to-php/styling_suggestotron.step
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ steps do
<body>
<?php
foreach ($topics as $topic) {
echo "<h3>" .$topic['title']. " (ID: " .$topic['id']. ")</h3>";
echo "<h3>{$topic['title']} (ID: {$topic['id']})</h3>";
echo "<p>";
echo nl2br($topic['description']);
echo "</p>";
echo "<p>";
echo "<a href='/edit.php?id=" .$topic['id']. "'>Edit</a>";
echo "<p>
echo "<a href='/edit.php?id={$topic['id']}'>Edit</a>";
echo " | ";
echo "<a href='/delete.php?id=" .$topic['id']. "'>Delete</a>";
echo "<a href='/delete.php?id={$topic['id']}'>Delete</a>";
echo "</p>";
}
?>
Expand Down Expand Up @@ -72,9 +72,9 @@ steps do
message "For example, by adding a simple class to our Edit and Delete links, we can make them look like buttons:"

source_code :php, <<-PHP
echo "<a href='/edit.php?id=" .$topic['id']. "' class='btn btn-primary'>Edit</a>";
echo "<a href='/edit.php?id={$topic['id']}' class='btn btn-primary'>Edit</a>";
echo " ";
echo "<a href='/delete.php?id=" .$topic['id']. "' class='btn btn-danger'>Delete</a>";
echo "<a href='/delete.php?id={$topic['id']}' class='btn btn-danger'>Delete</a>";
PHP
end

Expand Down