How about using explode to split the string Into an array at | and then use index 1.
$arr = explode("|", $string); echo $arr(1);
Summer Sale! All accounts are 50% off this week.
I have a string like this...
"Export Result for DMGS | JSS 1A | English Studies | 2017/2018"
JSS 1A is dynamic, i.e, it changes depending on the data exported. I only want to remove other parts of the string leaving just JSS 1A or whatever it is that will be placed there...
Thanks alot!
How about using explode to split the string Into an array at | and then use index 1.
$arr = explode("|", $string); echo $arr(1);
Please or to participate in this conversation.