mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-17 19:16:20 +02:00
Merge pull request #427 from florianletsch/gh-pages
Fixed inconsistent naming of example function
This commit is contained in:
@@ -26,11 +26,11 @@ Consider the most basic step:
|
|||||||
|
|
||||||
{% highlight php %}
|
{% highlight php %}
|
||||||
<?php
|
<?php
|
||||||
function getAllSomethings($db) {
|
function getAllFoos($db) {
|
||||||
return $db->query('SELECT * FROM table');
|
return $db->query('SELECT * FROM table');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (getAllFoos() as $row) {
|
foreach (getAllFoos($db) as $row) {
|
||||||
echo "<li>".$row['field1']." - ".$row['field1']."</li>"; // BAD!!
|
echo "<li>".$row['field1']." - ".$row['field1']."</li>"; // BAD!!
|
||||||
}
|
}
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
Reference in New Issue
Block a user