Remove excess characters from a string

Hi guys,

I know this is very basic but it will be a time saver if you guys help me.
Let say I have samples string below.

Now what I want is just to remove the _mdl characters.
What is the fastest to remove those characters?

thanks in advance.

Try str_replace(…)

Pecked from a tablet.

Edit again:
How did the excess characters become suffixed?

the suffix _mdl means model.
Now I need to remove the suffix to match the actual table name in the database.

Are you sure you don’t want to simply run a SHOW TABLES query?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.