Jump to content

split a string into array


xbl1

Recommended Posts

Hi;i am trying to split a string into array by regular expression, but it could not work, could anyone help, please.my work as following, but it does not work. i want to break the string into two part, one is "this is the test 1", and another one is "this is testing 2 </object> this is test 3"; $string = "this is the test 1 <object width=\"425\" height=\"355\"> this is testing 2 </object> this is test 3"; $str=split("<object(.?)>",$string); echo $str[0]; echo "<br>"; echo $str[1];

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...