我使用的是php 4.4.9。
以下是代码:
$ipgenARRAY = explode('0',$ipgenPLAY); // every character will be an array value
$ipgenARRAYPLAY = array_shift($ipgenARRAY); // Chop off a character (0)
array_push($ipgenARRAYPLAY,"1"); // Add a one [first warning here]
$ipgenARRAY = $ipgenARRAYPLAY; // Save ^ change for the next time the loop is run
$ipgenARTEMP = implode(",",$ipgenARRAYPLAY); // Make the array into a string
// with every array value split by a comma [second warning above]
$ipgenPLAY = str_replace(',','',$ipgenARTEMP); // remove all the commas
这是错误
Warning: array_push() [function.array-push]: First argument should be an array
Warning: implode() [function.implode]: Bad arguments
无论出于何种原因,我的数组都不被接受为数组