PHP linear table into the stack and out of the stack instance analysis, PHP linear table Example Analysis _php tutorial

Source: Internet
Author: User

PHP linear table in the stack and out of the stack instance analysis, PHP linear table instance Analysis


In this paper, we describe the usage of PHP linear table in the stack and the stack. Share to everyone for your reference. Specific as follows:

<?php $stack = Array ("Simon", "Elaine"); Defines the array array_push ($stack, "Helen", "Peter"); Into the stack print_r ($stack);?>
<?php $stack = Array ("Simon", "Elaine"); Defines the array array_unshift ($stack, "Helen", "Peter"); Into the stack print_r ($stack);?>
<?php $stack = Array ("Simon", "Elaine", "Helen", "Peter"); echo Array_pop ($stack). " /n "; Out of Stack print_r ($stack);?>
<?php $stack = Array ("Simon", "Elaine", "Helen", "Peter"); echo Array_shift ($stack). " /n "; Out of Stack print_r ($stack);?>

I hope this article is helpful to everyone's PHP programming.

http://www.bkjia.com/PHPjc/1015427.html www.bkjia.com true http://www.bkjia.com/PHPjc/1015427.html techarticle PHP Linear table in the stack and the example of the stack, PHP linear table example Analysis of the example of the PHP linear table in the stack and the use of the stack. Share to everyone for your reference. Specific as follows: P ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.