PHP code for String Tokenize
<?php
$string = "Hello Kamal. How are you Doing?";
$token = strtok($string, " ");
while ($token !== false)
{
echo "$token<br>";
$token = strtok(" ");
}
?>
PHP code for String Tokenize
<?php
$string = "Hello Kamal. How are you Doing?";
$token = strtok($string, " ");
while ($token !== false)
{
echo "$token<br>";
$token = strtok(" ");
}
?>
<?php // Initializing a variable with filename$file = 'myfilename.jpg'; // Extracting only filename using constants$fileWithoutExt = pathinfo($file, PATHINFO_FILENAME); // Printing the resultecho $fileWithoutExt; ?>Output |