「php開発」splitとexplodeの使い方のまとめ
関数説明:
array split (string $pattern, string $string [, int $limit])
array explode ( string $separator, string $string [, int $limit])
例1—explode
<?php
$test_startnews24 = end(explode('.’, 'abc_startnews24.txt’));
echo $test_startnews24;//output txt
例2—split
<?php
$test_startnews241 = end(split('\.’,’abc_startnews24.txt’));
echo $test_startnews241;//output txt