Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 12200

PHP is a widely-used, general-purpose scripting language that is especially suited for web development.

4 votes
2 answers
2k views

Working with dependency injection and factories

php class Config { // Class that holds config info. // Besides PDO connection info, contains flags for testing mode, live, eCommerce-enabled, etc. // no setters, only getters... … php echo $title ?></title> </head> <body id="<?php echo $bid ?>"> <ul> <?php foreach ($comments as $comment) { echo '<li>'.$comment.'</li>'; } ? …
AndyPerlitch's user avatar
3 votes

Am I on the right track? PHP/MySQL

Your config and name classes are good starts. Here are a few humble suggestions: I highly suggest steering clear of what is called the entity-attribute-value pattern when structuring your MySQL tabl …
AndyPerlitch's user avatar