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 Link to comment https://forums.phpfreaks.com/topic/102487-solved-a-delimiter-or-something-like-that/ 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"; } ?> Link to comment https://forums.phpfreaks.com/topic/102487-solved-a-delimiter-or-something-like-that/#findComment-524770 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! Link to comment https://forums.phpfreaks.com/topic/102487-solved-a-delimiter-or-something-like-that/#findComment-524802 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.