Creating a PHP array using variable names and values

It is possible to initialize a PHP array using compact function.

compact function accepts names of the variables as a text. Result of this operation will be an array which keys are variable names and values are values assigned to these variables.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator