How can I cut part of string before some word put on the end of the same string?
For example:
$data = '1.jpg,2.jpg,3.jpg,4.jpg,5.jpg,6.jpg,7.jpg,';
I want to put all before 4.jpg,
at the end of string like this:
$data = '4.jpg,5.jpg,6.jpg,7.jpg,1.jpg,2.jpg,3.jpg,';