JSProgramIA
Programmer
by better I guess more efficient, less code maybe?
Are there too many 'variables' for this to be done in a function?
Code:
.
.
.
$emails_row = mysql_fetch_array($emails_result);
$message = $emails_row['emails_text'];
// Replace values
$message = str_replace("::company name::", stripslashes($emails_row['company_name']), $message);
$message = str_replace("::project name::", stripslashes($emails_row['project_name']), $message);
$message = str_replace("::current total hours::", $emails_row['total_hours'], $message);
$message = str_replace("::current hours owed::", $emails_row['total_hours']-$emails_row['hours_paid'], $message);
$message = str_replace("::current hours paid::", $emails_row['hours_paid'], $message);
$message = str_replace("::tasks::", $_POST['email_text'], $message);
$message = str_replace("::developer::", $_POST['developer'], $message);
$message = str_replace("::date::", date("F j, Y"), $message);
Are there too many 'variables' for this to be done in a function?