Issue
I have one parameter every time it comes from the request object in a standard order,I want to store that string into an array by splitting \
for that i am using explode function it's throwing an error,please help me to explode with backslash
$obj = "App\Http\Data\User";
$array = explode("\",$obj);
Solution
You can use this:
$obj = "App\Http\Data\User";
$array = explode("\\",$obj);
print_r($array);
example here
Answered By - Voxxii Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.