I am new to PHP and I real need a help with this error. It keep me all night awake try to figure out to might be the problem but I can't get it right.
Parse error: syntax error, unexpected 'function_construction' (T_STRING), expecting function (T_FUNCTION) in C:\xampp\htdocs\amimo\includes\database.php on line 6
This is my code:
<?php
function strip_zeros_from_date($marked_string = "") {
// first remove the marked zeros
$no_zeros = str_replace('*'), '', $no_zeros);
$cleaned_string = str_replace('*0', '' , $no_zeros);
return $cleaned_string;
}
function redirect_to($location = NULL) {
if ($location!: = NULL) {
header("location :{$location}");
exit;
}
}
function out_message($message = "") {
if (! empty($message)) {
return "<p class=\"message\">{$message}</p>";
} else {
return"";
}
}
?>