拆分替换语法[复制]

Possible Duplicate:
PHP split alternative?

What would be the command/syntax for replacing the depreciated split in the following syntax:

  $frags = split("\/", $the_image_src);

The php docs for split suggest preg_split or explode, which has the same syntax

http://php.net/manual/en/function.split.php

See TIPS. Typically, deprecated functions will give alternatives

EDIT

preg_split("(/)", $the_image_src);

If you are not matching a pattern (regexp) and only splitting on a string, you can use explode. It will work faster as it doesn't need to call the regex engine to interpret a pattern and match (even if the pattern is just a string, there is still overhead). If you want to match a regexp pattern as split normally would, you should use preg_split.