How to mount the following array if one of the variables is not defined?
$a = 1;
$b = 2;
$d = 4;
$array = array($a, $b, $c, $d);
The values of the variables ($ a, $ b, $ c, and $ d) come from a server and often do not contain any value, so the array becomes inconsistent.
As a workaround, I could use isset () to check if they exist and if they did not exist, assign any value. But, I can not assign new values if they do not exist. How to proceed in the assembly?
If one of these does not exist, it is returned, as in the example code where the variable $ c: Undefined variable: c
is missing