Hello i am trying to create a function to pull data out of MySQL.
[php]
<?php function get_page_by_id($page_id) { global $connection; $query4 = "SELECT * "; $query4 .= " FROM tbl_pages"; $query4 .= " WHERE id=" . $page_id . " "; $query4 .= " LIMIT 1"; //REMEMBER: //if no rows are returned, the fetch-array will return false $result_set = mysql_query($query4, $connection); confirm_query($result_set); if ($page = mysql_fetch_array($result_set)){ return $page; } else { return NULL; } } ?>[/php]
When I go to the browser to check it it shows this error (Note: line 70 is the last line) so it most likely a problem with the curly bracket is what I am thinking, any thoughts?
( ! ) Parse error: syntax error, unexpected end of file in ?!?!?!?/functions.php on line 70
Call Stack
Time Memory Function Location
1 0.0022 146952 {main}( ) …\content.php:0