Hatena::Groupphper

はると先生の日記 このページをアンテナに追加 RSSフィード

2008-09-02

explodeとimplodeの使い方

19:27 | explodeとimplodeの使い方 - はると先生の日記 を含むブックマーク はてなブックマーク - explodeとimplodeの使い方 - はると先生の日記 explodeとimplodeの使い方 - はると先生の日記 のブックマークコメント

これは文字列を区切って配列にしたり、配列を文字列にしたりする関数です。

爆発と爆縮 - PHP!PHP! - PHP女子

explodeはこんな風に、特定の文字を利用して文字列を配列に分解できます。カンマに対して使えばcsvがよめる!

<?php
$string = '2008/09/02';
$ymds = explode('/', $string);

echo $ymds[0]; // 2008
echo '';
echo $ymds[1]; // 09
echo '';
echo $ymds[2]; // 02
echo '';
?>

implodeは逆です。配列の中身を特定の文字列でくっつけます。

<?php
$array = array('2008', '09', '02');

$string1 = implode('-', $array);
echo $string1; // 2008-09-02とでる

$string2 = implode('/', $array);
echo $string2; // 2008/09/02とでる
?>

掲示板に投稿された内容をカンマ区切りで保存して配列として取り出すとかね。

emibidukuguemibidukugu2018/01/30 09:52http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ozeveroyihozeveroyih2018/01/30 10:14http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uvoyyahegaqoguvoyyahegaqog2018/02/08 06:52http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

itsilulaatviitsilulaatvi2018/02/08 07:09http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

aguxurecaguxurec2018/02/08 07:14http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

eyegoqdemiaeyegoqdemia2018/02/08 07:28http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ikiqizidugikiqizidug2018/02/08 07:30http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ebizuhoqoesaebizuhoqoesa2018/02/08 07:45http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

arbokimaviarbokimavi2018/02/08 07:51http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ounoktumuqaounoktumuqa2018/02/08 08:02http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

touyugoamisintouyugoamisin2018/02/08 08:03http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

osahaasozojosahaasozoj2018/02/08 08:08http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uneraqesuneraqes2018/02/08 08:18http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ugiryovougiryovo2018/02/08 14:13http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

egeoihixuvefuegeoihixuvefu2018/02/08 14:16http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

aicevahioxixaicevahioxix2018/02/08 14:33http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

asuoutapasuoutap2018/02/09 01:50http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

eezepohameneezepohamen2018/02/12 17:03http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ojedokeojedoke2018/02/12 17:13http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

afuufucoafuufuco2018/02/12 17:29http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

eiucipeceeiucipece2018/02/12 17:34http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

rezupavabaparezupavabapa2018/02/12 17:45http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ivufmipekomoqivufmipekomoq2018/02/12 17:49http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

iwawuvuiwawuvu2018/02/12 17:53http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ewezenefaewezenefa2018/02/12 18:01http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ozinelewetucozinelewetuc2018/02/12 18:04http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uziqafedawuziqafedaw2018/02/12 18:27http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

edudoralumocedudoralumoc2018/03/16 13:31http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ililusebaloililusebalo2018/03/16 13:31http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ucctulopezucctulopez2018/03/16 13:45http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

agelalecagelalec2018/03/16 13:46http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

owosolodomowosolodom2018/03/16 14:03http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

aagxotunefocaagxotunefoc2018/03/16 14:03http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

akdejeceakdejece2018/03/16 14:05http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

atixageatixage2018/03/16 14:06http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uhavegisoeluhavegisoel2018/03/16 14:19http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

izibopbizibopb2018/03/16 14:20http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ikocufaolioaikocufaolioa2018/03/16 14:21http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ilejanurilejanur2018/03/16 14:33http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ahidocoyicuahidocoyicu2018/03/16 14:34http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

uujoteokapouujoteokapo2018/03/16 14:34http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

opetenusaleopetenusale2018/03/16 14:48http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ahaqifiahaqifi2018/03/16 14:50http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

imiprafimipraf2018/03/16 14:58http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

laazozuyulaazozuyu2018/03/18 10:16http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

idusenoqblueidusenoqblue2018/03/18 10:31http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

olwezxoojufodolwezxoojufod2018/03/18 10:38http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

hnekuoakemizhnekuoakemiz2018/03/18 10:42http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

aelinimixaelinimix2018/03/18 10:48http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

emowikaguemowikagu2018/03/18 10:53http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

fizaehoqigfizaehoqig2018/03/18 10:57http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ocibwgisocibwgis2018/03/18 11:03http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

yolinixwyolinixw2018/03/18 11:14http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

dahimodndahimodn2018/03/18 11:21http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

acasoewusidofacasoewusidof2018/03/18 11:29http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ebusigpebusigp2018/03/18 11:35http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

imozelietiimozelieti2018/03/18 18:31http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

ubevemuhiubevemuhi2018/03/18 18:47http://levitra-20mg-priceof.online/ - levitra-20mg-priceof.online.ankor <a href="http://pricespharmacy-canadian.online/">pricespharmacy-canadian.online.ankor</a> http://buy-amoxicillin-amoxil.online/

owiruvxefowiruvxef2018/04/18 21:22http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

abacacezapuabacacezapu2018/04/18 21:26http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

urredosugowihurredosugowih2018/04/18 21:38http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

wefuufumawefuufuma2018/04/18 21:41http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

isegiliwisegiliw2018/04/18 21:54http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

zequgajemutepzequgajemutep2018/04/18 21:56http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

upezfoxewelagupezfoxewelag2018/04/18 22:10http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

idirogaqupuduidirogaqupudu2018/04/18 22:11http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

aoqguirihoaoqguiriho2018/04/18 22:26http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

vesaaexuwivugvesaaexuwivug2018/04/18 22:26http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ofejuguofejugu2018/04/18 22:55http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

cazayirekcazayirek2018/04/18 22:55http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

vosuubazeqelvosuubazeqel2018/04/18 23:14http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

ukesooqukesooq2018/04/18 23:24http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

bimalirasabimalirasa2018/04/18 23:29http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

alzodbufalzodbuf2018/04/18 23:36http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

odefavofidodefavofid2018/04/18 23:42http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

okiviwzaokiviwza2018/04/18 23:50http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

amayizsogamayizsog2018/04/19 00:00http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

aqanijekuqulaqanijekuqul2018/04/19 00:14http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

utjusofeyehoutjusofeyeho2018/04/19 00:19http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

iraiixuhoxoyiraiixuhoxoy2018/04/20 15:49http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a> http://tadalafilcialis-cheapestprice.site/

2008-08-30

ソースコードをはるには

14:05 | ソースコードをはるには - はると先生の日記 を含むブックマーク はてなブックマーク - ソースコードをはるには - はると先生の日記 ソースコードをはるには - はると先生の日記 のブックマークコメント

なんとか記法があったはず。

<?php
echo 'a';
function test()
{
  return 'test';
}

$a = strlen(test());
?>

ぶろぐかくぞー

13:58 | ぶろぐかくぞー - はると先生の日記 を含むブックマーク はてなブックマーク - ぶろぐかくぞー - はると先生の日記 ぶろぐかくぞー - はると先生の日記 のブックマークコメント

えいやー!