Strange parameter passing problem [PHPPchartaddPoints method]

Source: Internet
Author: User
Strange parameter passing problem [PHPPchartaddPoints method]
// Obtain the URL parameter for ($ I = 0; $ I <= 30; $ I ++) {$ countinfo [$ I] =_ _ GET ["_ URL _"] [$ I + 3] ;}$ str = join (",", $ countinfo ); // combine them into strings to obtain 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 // count the page views $ MyData-> addPoints (array ($ countinfo ['0'], $ countinfo ['1'], $ countinfo ['2'], $ countinfo ['3'], $ countinfo ['4'], $ countinfo ['5'], $ countinfo ['6'], $ countinfo ['7'], $ countinfo ['8'], $ countinfo ['9'], $ countinfo ['10'], $ countinfo ['11'], $ countinfo ['12'], $ countinfo ['13'], $ countinfo ['14'], $ countinfo ['15'], $ countinfo ['16'], $ countinfo ['17'], $ countinfo ['18'], $ countinfo ['19'], $ countinfo ['20'], $ countinfo ['21'], $ countinfo ['22'], $ countinfo ['23'], $ countinfo ['24'], $ countinfo ['25'], $ countinfo ['26'], $ countinfo ['27'], $ countinfo ['28'], $ countinfo ['29'], $ countinfo ['30']), "Browse Statistics table for current month ");
In this way, it can be displayed normally. I combined the $ countinfo array into a string $ str, but it will be abnormal if it is passed in. For example, when it is normal: when it is not normal: when it involves a class similar to passing parameters, it must be solved. otherwise, write the code like this, don't let the crash die. [because I am calling the public function DPchart () {} method, he cannot print out the array, developed based on TP]


Reply to discussion (solution)

Sao, it's too complicated ..

I am guilty of two... Points.

It's enough.
AddPoints requires the input of an array. of course you cannot pass the string

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.