MattF
10-24-2000, 11:02 AM
I'm using PHP under windows and it appear that my variables names are case sensitivie, I don't this. Is there an option in php.ini to disable this? or a runtime directive?
Also, can any code wizards find a faster way to do this:
ToSave = Array();
While (list ($key,$val) = each ($DatabaseFields)) {
While (list ($key2,$val2) = each ($SubmittedDetails)) {
$key3 = substr($key2,9,(strlen($key2) - 9)))
If ($val == $key3) {
ToSave[$key] = $val2;
}[nbsp][nbsp]}[nbsp][nbsp]}
Example of contents of $DatabaseFields:
'1' ==> 'Name'
'2' ==> 'Age'
'3' ==> 'Height'
'4' ==> 'Sex'
Example of contents of $SubmittedDetails
'Name' ==> 'Fred'
'Age' ==> '80'
'ShoeSize' ==> '4'
This little script is part of a large script so I'm not looking to change the whole thing.
Also, can any code wizards find a faster way to do this:
ToSave = Array();
While (list ($key,$val) = each ($DatabaseFields)) {
While (list ($key2,$val2) = each ($SubmittedDetails)) {
$key3 = substr($key2,9,(strlen($key2) - 9)))
If ($val == $key3) {
ToSave[$key] = $val2;
}[nbsp][nbsp]}[nbsp][nbsp]}
Example of contents of $DatabaseFields:
'1' ==> 'Name'
'2' ==> 'Age'
'3' ==> 'Height'
'4' ==> 'Sex'
Example of contents of $SubmittedDetails
'Name' ==> 'Fred'
'Age' ==> '80'
'ShoeSize' ==> '4'
This little script is part of a large script so I'm not looking to change the whole thing.