Hi I am having trouble with this code:
<?php
//init.inc.php file
session_start();
mysql_connect('mysql.host.com', 'username', 'password');
mysql_select_db('DB name');
include('include');
// Get users from table
function fetch_users() {
$result = mysql_query('SELECT 'user_id' AS 'id', 'user_username' AS 'username' FROM profile'); // Error on this line: Parse error: syntax error, unexpected T_STRING on line 14
$users = array();
while ($row = mysql_fetch_assoc($result) !== false) {
$users[] = $row;
}
return $users();
}
?>
I dont know how to fix this. I would be glad if you helped.