php string-manipulation (clear the "_" and the timestamp)

Posted by Zoltan Repas on Stack Overflow See other posts from Stack Overflow or by Zoltan Repas
Published on 2010-03-13T10:29:19Z Indexed on 2010/03/13 10:35 UTC
Read the original article Hit count: 644

Filed under:
|

Hi!

I cant find the way how to strip the useless section of my string (read from SQL) I've tried the strreplace and truncate but those was not good at all.

I've got a string variable called $stuff

if $stuff = 145_timestamp i want to clear the _ and the chars after it. so i want to $stuff be 145 only. Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about string-manipulation