note 110432 added to function.preg-match-all

From: Date: Mon, 22 Oct 2012 02:42:13 +0000
Subject: note 110432 added to function.preg-match-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-191458@lists.php.net to get a copy of this message
After doing following : preg_match_all($pattern,$str,$anchor); If my next code line is : echo count($anchor[2]); It gives me output : 50 But if my next code lines are echo count($anchor[2]); $title = $anchor[2]; It shows me error "Notice: Undefined offset: 2" for BOTH lines. How can adding a line give error in previous line ?? ---- Server IP: 69.147.83.199 Probable Submitter: 76.170.180.103 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php Edit -- https://master.php.net/note/edit/110432 Del: integrated -- https://master.php.net/note/delete/110432/integrated Del: useless -- https://master.php.net/note/delete/110432/useless Del: bad code -- https://master.php.net/note/delete/110432/bad+code Del: spam -- https://master.php.net/note/delete/110432/spam Del: non-english -- https://master.php.net/note/delete/110432/non-english Del: in docs -- https://master.php.net/note/delete/110432/in+docs Del: other reasons-- https://master.php.net/note/delete/110432 Reject -- https://master.php.net/note/reject/110432 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191458) next »