我的時髦代碼有什麼問題? 我張貼用ajax字符串
脫穎而出例如:309534368.gif,400559388.jpg,859954067.jpg,821646469.jpg
在我的PHP紙條我寫這篇文章explode()給我在php中未定義的偏移量
$gr = preg_replace('#[^a-z0-9-,.]#i', '', $_POST['gr']);
$array_gr = explode(',',$gr);
if(count($array_gr)>=1){
for($i=0;$i<= count($array_gr);$i++){
$corentimg=$array_gr[$i];
......
,當我跑我的代碼我得到了我想要+ Notice Undefined offset
: 在這條線$corentimg=$array_gr[$i];
爲什麼?
從'0'開始的4個項目的最大索引是3,但count()返回4. – AbraCadaver
'$ i
我的ajax字符串可能是N長 –