--- Brian E Boothe <[EMAIL PROTECTED]> wrote: > if i have a date such as 6/12/2008 how can i get it to Submit as 6122008 > also i have a 4 letter Company Abbreviation i would like to put to the > end of that : > so if i select LSRW id like it to Combine with the date like > 6122008LSRW that is going to be our > job number reference to projects > Also a refrerence to what the job is > Plant=1 > Well=2 > Tower=3 > > so the enite String would be 61220083LSRW > > Any refrences or examples would be great > thanks
It appears that you are trying to concatenate strings. This can be done either with the concatenation operator (.) or by using the variables in a double quoted string. For example: $date = str_replace("/","","6/12/2008"); $type = "LSRW"; $job = 3; $final = "$date$job$type"; // or $date . $job . $type However, you should think about how you are handling the dates. For example, you don't have a leading 0 for the month and if you don't have one for the day, things can get messy very quickly. Also, for sorting and extraction, it is far better to use YYYYMMDD as your format. The month and day fields are always two digits. $date = date("Ymd", strtotime("6/12/2008")); $type = "LSRW"; $job = 3; $final = "$date$job$type"; // 200806123LSRW If you are trying to take the form inputs and combine them before they are posted to the server, that is a Javascript question and belongs to another forum. James