--- Brian E Boothe <[EMAIL PROTECTED]> wrote:
> Im looking for a way to take the date in the
> following Format
> 2/3/2008 and make it appear in another box as
> 232008 now if a user is
> logged in it takes there initails
> and puts it at the end of that number so it would
> be 232008BB for me '
> now at the beginning of that number would be the job
> code
> Job codes are
> Electrical = 1 IT/Computer = 2
> Contruction =3
> so when i enter in a job it gets 2232008BB can
> anyone give me any
> examples of how to accomplish this : thanks
>
Sounds like you need concatenation!
You can take multiple strings and combine them into
one by concatenating them. For instance:
$string1 = "butter";
$string2 = "fly";
$string3 = "$string1"."$string2";
$string3 will have a value of "butterfly".
You can string together as many variables as you need
to this way.
Yours might look something like:
$string =
"$job_code"."$month"."$day"."$year"."$initials";
Word of warning: You may want to use strict 2-digit
codes for your month and year variables. Otherwise
you won't know if 1232008 means January 23 or December
3. Having 0123 for Jan 23 and 1203 for Dec 3 removes
the confusion.
Michael Roush
[EMAIL PROTECTED]
"The power of the Web is in its universality. Access by everyone regardless of
disability is an essential aspect."
-- Tim Berners-Lee, W3C Director and inventor of the World Wide Web
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ