A strange problem occurred in the call array

Source: Internet
Author: User
$_PX = (int) $px-1; echo ">-$_px-<";
echo erlist [54][' Paperid ']; echo "| | |";

If it is written here erlist [54][' Paperid ']; You can print out the values.

If write erlist[$_px][' Paperid ']; The value is 0, it seems to be gone.

Excuse me, why is this?

What should I write about it?


Reply to discussion (solution)

echo erlist [54][' Paperid ']; value 1234

------
But
$_PX = 55;
$_PX = $px-1;
echo erlist [$_px][' Paperid ']; the value is 0.

echo erlist [54][' Paperid ']; value 1234

------
But
$_PX = 55;
$_PX = $_px-1;
echo erlist [$_px][' Paperid ']; the value is 0.

erlist = Array (), erlist [si] = array (    ' paperid ' = + 1234); echo erlist [54][' Paperid ']. '
'; $_px = 55;$_px = $_px-1;echo erlist [$_px][' Paperid '];


Is output 1234, no problem.
  • 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.