NoMansLand Posted March 31, 2011 Share Posted March 31, 2011 Hello, I am trying to find a character in my DB's. The DB has the data setup with +(number) & -(number) I want to try and find a way for PHP to seperate them into two so each one has the seperate colour's. i have tried preg_match, strstr & strpos but none of them seem to work. Can you as PHP Genius's help out? EDIT: Please Do Not Worry, I have fixed this. For people who were wondering: $new_variable = strstr($variable_to_check, "+"); if($new_variable == "") { do one you want } else { do what you want. } Thanks PHP Freaks Thanks, NoMansLand Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.