OMITT3D
Jun 22nd, 2006, 04:53 AM
Hi I am new to PHP functions and was wondering why this isn't working.
function curdate($supdate) {
$return_date = $supdate{0};
$return_date = $return_date.$supdate{1};
if($return_date == '01') {
$return_date == 'January';
} //etc etc
reuturn $return_date;
}
It's being called with
$supdate = curdate($row['signed_up']);
$row['signed_up'] Say would be equal to 032588 meaning March 25, 1988. The error is:
Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\rpg\config.php on line 19
Line 19 = return $return_date;
Also is there a better way to dow hat I am doing?
function curdate($supdate) {
$return_date = $supdate{0};
$return_date = $return_date.$supdate{1};
if($return_date == '01') {
$return_date == 'January';
} //etc etc
reuturn $return_date;
}
It's being called with
$supdate = curdate($row['signed_up']);
$row['signed_up'] Say would be equal to 032588 meaning March 25, 1988. The error is:
Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\rpg\config.php on line 19
Line 19 = return $return_date;
Also is there a better way to dow hat I am doing?