Jump to content

Explode on special character?


Kane250

Recommended Posts

Any way to explode on bullets?  I know it's a special character, but I can't figure it out  :(

 

$manyItems = "• the first thing • the second thing • the third thing •  etc •  etc";

//This doesn't work
$items = explode("•", $manyItems);

//Neither does this
$items = explode("•", $manyItems);

 

Any suggestions?  Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/230219-explode-on-special-character/
Share on other sites

It does work mate, you're doing something wrong probably. Try maybe like this:

 

<?
   $manyItems = '• the first thing • the second thing • the third thing •  etc •  etc';

   //This does work
   $items = explode(chr(149), $manyItems);

   print_r($items);
?>

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.