PHP Assign Multiple Variables in One Line
<?php
$var1 = $var2 = $var3 = '';
?>
When you need to assign or declare mutliple variables at once, this can be accomplished with one line. So instead of making your code look cluttered like so:
$var1 = '';
$var2 = '';
$var3 = '';
To perform the exact same functionality in one line, you can write it like so:
$var1 = $var2 = $var3 = '';
Easy peasy, right? Hope that helps :)
No explanation generated yet.