Jump to content

Finding Character In A string?


daxguy

Recommended Posts

What do you mean by "find it"? If you just want to know if it occurs, and how many times, you can use substr_count for that.

 

I think you want to use explode just from what I think you're trying to do....

 

list($series, $episode, $title) = explode(" - ", $string);

echo $series; // Mumbai Mast Kallander
echo $episode; // 02
echo $title; // Mumbai Mast Kallander

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.