Below is the PHP list() function with example:
<!DOCTYPE html>
<html>
<body>
<?php
$my_array = array("car","bike","cycle");
list($a, , $c) = $my_array;
echo "This is the $a and $c variables.";
?>
</body>
</html>
Output is:
This is the car, bike, cycle.
Enjoy!
<!DOCTYPE html>
<html>
<body>
<?php
$my_array = array("car","bike","cycle");
list($a, , $c) = $my_array;
echo "This is the $a and $c variables.";
?>
</body>
</html>
Output is:
This is the car, bike, cycle.
Enjoy!
No comments:
Post a Comment