note 55260 added to function.preg-split

From: Date: Thu, 28 Jul 2005 17:23:51 +0000
Subject: note 55260 added to function.preg-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-92658@lists.php.net to get a copy of this message
I have a big string with various _______________________ <dt> <a href="...">TEXT</a> <small>(TEXT)</small></dt> <dd><small>DATE, HOUR</small></dd> <dd><small> DESCRIPTION. </small><p></dd> _______________________ I need to split this big string to another array with components from sections: <dt>...<p></dd> * array[0]: i try with preg_split: <?php /* In m[] I have the array with various ________________________________ <dt> <a href="...">TEXT</a> <small>(TEXT)</small></dt> <dd><small>DATE, HOUR</small></dd> <dd><small> DESCRIPTION. </small><p></dd> ________________________________ */ function Extract_Data ($m[], $maxlength) { for ($i=0; $i<$maxlength; $i++){ echo preg_split('(\<dt\>(.*)\<p\>\</dd\>)',$m[$i]); } ?> But it's not working at all...any teacher who teach me?, please :-) thanks! ---- Submitter IP: 130.206.1.5 ---- Manual Page -- http://www.php.net/manual/en/function.preg-split.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55260 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55260&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55260&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55260&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55260&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55260&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55260&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55260&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92658) next »