joshblue Posted April 23, 2008 Share Posted April 23, 2008 What function should I use to do this... If the original text is SAMPLE || SAMPLE, I should output it that any string starting from '||' will be remove so the output will be just SAMPLE only Quote Link to comment Share on other sites More sharing options...
trq Posted April 23, 2008 Share Posted April 23, 2008 <?php foreach (explode(" || ", "SAMPLE || SAMPLE") as $value) { echo $value . "\n"; } ?> Quote Link to comment Share on other sites More sharing options...
joshblue Posted April 23, 2008 Author Share Posted April 23, 2008 <?php foreach (explode(" || ", "SAMPLE || SAMPLE") as $value) { echo $value . "\n"; } ?> Ah, yes, now I remember! Thank you very much! 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.