Ok here we go:
this is my array elements:
$formFieldsArray = array('username/Username/text/1',
'password1/Password/password/1',
'password2/Password (for verification
purposes)/password/1',
'firstname/First Name/text/0', 'lastname/Last
Name/text/0',
'address1/Address/text/0', 'address2/Address Line
2/text/0',
'city/City/text/0', 'state/State/dropdown/0',
'zip/Zip - Postal/text/0',
'country/Country/dropdown/0',
'homephone/Home Phone/text/0', 'workphone/Work
Phone/text/0',
'fax/Fax/text/0',
'isRegisteredFromHome/Are you registering from
your home PC?/radio/0');
I want to get "state" and "country", from those parse "state.xml" and
"country.xml" into simple XML parsing 3-dimensional array structures, and
loop through those structures to populate a dropdown.
Ideas? I can't think of any dynamic way of doing it.
Phil
"Phil Powell" <so*****@erols.com> wrote in message
news:kYW_a.403$3M4.194@lakeread04...
That would work for the first one, (i.e., "This"), but what if I want to
get "A" or "Test"?
Phil
"Dennis Friis" <pe******@PAM.placid.dk> wrote in message
news:3f**********************@nntp03.dk.telia.net. .. "Phil Powell" <so*****@erols.com> wrote in message
news:3GT_a.390$3M4.260@lakeread04... ucfirst({explode('/', $val)}[0])
This produces a parse error expecting ')', but why? I thought this was
perfectly valid code structuring in PHP!
already said why it can't be done, but I can see what you are trying to
do, so here is an
solution perhaps:
consider:
<?
$var = "this is a test";
print ucfirst(current(explode(" ", $var)));
?>
Will output:
This
something like that you where looking for?
--
Vh
Dennis Friis
IRC: peavey - #linux.dk@undernet