assc
September 13, 2023, 5:34pm
1
I would like to create array using variables like this; what is the best alternative since this will not work?
$dn = array(
"countryName" => $country,
"stateOrProvinceName" => $state,
"localityName" => $city,
"organizationName" => $company,
"organizationalUnitName" => $department,
"commonName" => $domain,
"emailAddress" => $email
);
That way seems fine, what’s not working?
Yes, that seems fine, please expand on “will not work”.
assc
September 13, 2023, 6:37pm
4
the array is not populated with the values in these variables as if using variables is not allowed, but if you are sure it is allowed, I will continue looking for errors in my script. Thanks.
Is the array not populated but contains the keys? If so, are you sure your variables ($country, $email, etc) exist in the context you’re using them?
assc
September 13, 2023, 9:17pm
6
You are correct, this part of my code is working, and I have found my bug, thanks everyone!
1 Like