This article mainly introduces the php linear table's inbound and outbound stack, and analyzes the php operation linear table's inbound and outbound skills, for more information, see the examples in this article to describe the inbound and outbound usage of php linear tables. Share it with you for your reference. The details are as follows:
<? Php $ stack = array ("Simon", "Elaine"); // defines the array array_push ($ stack, "Helen", "Peter "); // print_r ($ stack);?>
<? Php $ stack = array ("Simon", "Elaine"); // defines the array array_unshift ($ stack, "Helen", "Peter "); // print_r ($ stack);?>
<? Php $ stack = array ("Simon", "Elaine", "Helen", "Peter"); echo array_pop ($ stack ). "/n"; // print_r ($ stack);?>
<? Php $ stack = array ("Simon", "Elaine", "Helen", "Peter"); echo array_shift ($ stack ). "/n"; // print_r ($ stack);?>
I hope this article will help you with php programming.