Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
こんにちは、値が 2012-21-04 のボックスがあります。私がやりたいことは、年、月、日を表示するために 3 つの選択オプションを使用することです。php を使用して各値を抽出します。これにどのようにアプローチしますか?
常に同じタイプの文字列を使用する場合は、「-」を区切り文字として使用して文字列を分割します。
$arr_date = explode("-",$date); // $date being "2012-21-04"
$arr_date は、3 つの区切られた数値を含む 3 つの要素の配列になります
よろしく、ステファン