Created
October 7, 2019 05:15
-
-
Save neps-in/70dbd6f613d6d70f463c8bc98d6a2bc6 to your computer and use it in GitHub Desktop.
explode can use words as delimiters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Even words can be use as delimiters in php explode function. | |
$s = 'Napoleon and Arouldas'; | |
$s_pieces = explode('and', $s); | |
$rating = $s_pieces[0]; | |
$review_count = $s_pieces[1]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment