Posted by Jerry Stuckle on 02/07/07 16:36
Auddog wrote:
> I would like to know how I can break apart a variable. I'm currently
> passing the variable $id-hours and I would like to break it down. I would
> like to break down to something similar to:
>
> $eid = id (id part of $id-hours)
> $ehour = hours (hours part of $id-hours)
>
> Is this possible? I'm new to programming and just trying to get thru it
> all. Thanks for any help that you may be able to provide.
>
> A
>
>
Not easily. When you pass a variable to a function the name of the
variable changes.
But why would you need to, anyway? Variable names are just there for
human readability; they should be meaningful to the programmer, but the
computer doesn't care.
And BTW - $id-hours is an invalid variable name. The hyphen isn't valid
in a variable name.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|