Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
1
10php
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yu Kimiduka
10php
Commits
f45d2293
Commit
f45d2293
authored
Jul 07, 2016
by
君塚 悠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
プログラム作成(kuji.php:おみくじ)
parent
a71f51a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
kuji.php
php/php10/day03-1/kuji.php
+16
-0
No files found.
php/php10/day03-1/kuji.php
0 → 100644
View file @
f45d2293
<?php
//おみくじデータの用意
$aryTitle
=
array
(
"大吉"
,
"中吉"
,
"小吉"
,
"吉"
,
"凶"
);
$aryKuji
=
array
(
"大吉"
=>
"ラッキー!今日は超ハッピー!!"
,
"中吉"
=>
"良かったよかった。今日も元気に頑張りましょう。"
,
"小吉"
=>
"小さな幸せを大事にネ。"
,
"吉"
=>
"今日も無難に良い1日を..."
,
"凶"
=>
"ムムムな今日は大人しく過ごしましょう。"
);
//おみくじのシャッフル
shuffle
(
$aryTitle
);
echo
$aryTitle
[
0
],
"
\n
"
;
echo
$aryKuji
[
$aryTitle
[
0
]],
"
\n
"
;
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment