2010年06月11日 過去Blog
要素Aが配列Bの中に存在するか調べるには in_array を使う。 以下の例では、配列Bの中に要素Aが存在するので「Got elementA」が出力されます。 $arrayB = array(“elementA”, “NT”, “Irix”, “Linux”); if (in_array(“elementA”, $arrayB)) { echo “Got elementA”; }

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

PHP 配列の結合

2010年05月20日 過去Blog
$array3 = array_merge($array1,$array2); a complete guide to the acai berry diet…
「PHP 配列の結合」をはてなブックマークに追加

お名前.com VPS サーバでphp アップデート

2011年04月25日 過去Blog
まず、ファイアーウォールからSSHを許可 http://guide.onamae-server.com/vps/3/31/81/124/ ステム設定 > セキュリティー > アップデートからアップデートなし(上級者向け)に変更。これでyumコマンドが使えるようになる。 サーバ管理画面上から システム設定>ユーザ>一般アカウント で一般ユーザのアカウントを作成。 Macのターミナ…
「お名前.com VPS サーバでphp アップデート」をはてなブックマークに追加

外部のサイトから画像をサーバに取得(コピー)

2009年12月06日 過去Blog
$img_path // 取得する画像のパス(URL) $path = "ここは保存先のパス";  //  /home/ドメイン/public_html/imagesなど $img = file_get_contents($img_path) ;//画像を取得 $fullpath = $path.basename($img_path);//画像の保存フルパス file_put_conten…
「外部のサイトから画像をサーバに取得(コピー)」をはてなブックマークに追加

phpでwhois情報の取得

2009年12月26日 過去Blog
Net_Whois::query() – whois 問い合わせを実行する pear install Net_Socket pear install Net_Whois もし、「WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update」 という警告が出る場合は、以下を実行して、pear.php.netをアップデートします。 # pear channel-update pear.php.net 私の場合は、警告は出ましたが、アップグレードしなくても pear install Net_Socket pear install Net_Whois のインストールは完了しました。 …
「phpでwhois情報の取得」をはてなブックマークに追加

linux : chomod,chown パーミッション変更

2009年11月27日 過去Blog
chown USER_NAME /DIR_PATH/ chown USER_NAME -R /DIR_PATH/ -Rをつけることで指定ディレクトリ以下の全てのディレクトリ、ファイルの所有者を変更します。 physical therapy chicago…
「linux : chomod,chown パーミッション変更」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy