Created
September 4, 2013 16:34
-
-
Save Shivabeach/6439505 to your computer and use it in GitHub Desktop.
PDO select with foreach inline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach(->query('SELECT * FROM table') as $row) { | |
echo $row['field1'].' '.$row['field2']; //etc... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment