Created
April 30, 2015 16:11
-
-
Save RobbiNespu/f5634d60b64fa205bb85 to your computer and use it in GitHub Desktop.
Filter "space" input
This file contains 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 | |
$input = "2 4"; // Input dari user | |
print_r(str_split($input)); // Tgk kedudukan array 0 hingga 2 | |
$input = str_split($input); | |
echo "Data :".$input[0]; // Display kedudukan array[0] | |
echo "\n"; // Skip array[1] | |
echo "Data :".$input[2]; // Display kedudukan array[2] | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment