정보실

웹학교

정보실

php Login ID Options

본문

<HTML>

  <HEAD>

  <TITLE>Displaying Login ID Options</TITLE>

  </HEAD>

  <BODY>

  <Hl><CENTER>Generating Login IDs for Dave</CENTER></Hl>

  <?php

  $loginfo = array (

             FirstName => "Joe",

             LastName => "Howrod",

             Sex => "Male",

             Location => "Arizona",

             Age => "24",

             MusicChoice => "Pop",

             Hobby => "Dance",

             Occupation => "Author");

 

  echo "<H3>The information entered by JOe:<BR></H3>"; 

  foreach ($loginfo as $key => $val) {

     echo "<B>$key</B> => $val<BR>";

  }

  echo "<BR> ";

  echo "<H3>The login options are:<BR></H3>";

 

  $loginone = array_slice ($loginfo, 0, 2);

  $logintwo = array_slice ($loginfo, 3, 2);

  $loginthree = array_slice ($loginfo, 5, 2);

  $loginfour = array_slice ($loginfo, 6, 2);

  $loginfive = array_merge ($loginfour, "2001");

 

  echo "The first login option:<BR>";

  foreach ($loginone as $optionone) {

      echo "<B>$optionone</B>";

  }

  echo "<BR>";

 

  echo "The second login option:<BR>";

  foreach ($loginone as $optiontwo) {

      echo "<B>$optiontwo</B>";

  }

  echo "<BR>";

 

  echo "The third login option:<BR>";

  foreach ($loginthree as $optionthree) {

      echo "<B>$optionthree</B>";

  }

  echo "<BR>";

  

  echo "The fourth login option:<BR>";

  foreach ($loginfour as $optionfour) {

      echo "<B>$optionfour</B>";

  }

 

  echo "<BR>";

  echo "The fifth login option:<BR>";

  foreach ($loginfive as $optionfive) {

      echo "<B>$optionfive</B>";

  }

  echo "<BR>";

  ?>

  </BODY>

  </HTML> 

  • 트위터로 보내기
  • 페이스북으로 보내기
  • 구글플러스로 보내기
  • 카카오톡으로 보내기

페이지 정보

조회 178회 ]  작성일15-06-10 10:55
php

웹학교