Lib Sci Notes

University of North Texas Department of Library and Information Science

Notes & Scripts

Stuff by J Newland

Stuff by Liz Castro

Scripts by Larry Ullman (PHP book 4th ed. scriptssource)

    Ch 1 Getting Started w/ PHP

  • Print plain text – Script 1.3 (testsource)
  • Print HTML – Script 1.4 (testsource)
  • Print whitespace – Script 1.5 (testsource)
  • Commenting – Script 1.6 (testsource)
    Ch 2 Variables in PHP

  • print_r Function – Script 2.1 (testsource)
  • Commenting variables – Script 2.2 (testsource)
  • Variables – Script 2.3 (testsource)
  • Quotes – Script 2.4 (testsource)
    Ch 4 Numbers in PHP

  • Using arithmetic expressions – Script 4.2 (testsource)
  • Formatting numbers – Script 4.3 (testsource)
  • Operator precedence – Script 4.4 (testsource)
  • Increment/decrement – Script 4.5 (testsource)
  • Random numbers – Script 4.6 (testsource)
    Ch 5 Strings in PHP

  • Concatenation – Script 5.2 (testsource)
  • Magic quotes – Script 5.3 (testsourceadd slashes)
  • PHP & HTML – Script 5.4 (testsource)
  • URL encoding – Script 5.5 & 5.6 (testsource for handle_post.php – source for thanks.php)
  • String replacement – Script 5.7 (testsource for handle_post.php – source for thanks.php)
  • Other string stuff – Script 5.8 (testsource for handle_post.php – source for thanks.php)
    Ch 6 Control Structures in PHP

  • if statements – Script 6.2 (testsource)
  • if-else statements – Script 6.3 (testsource)
  • Relational operators – Script 6.4 (testsource)
  • Logical operators & nested if’s – Script 6.5 (testsource)
  • elseif statements- Script 6.6 (testsource)
  • Switch statements – Script 6.7 (testsource)
  • for loops – Script 6.8 (testsource)
    Ch 7 Using Arrays in PHP

  • Creating an array – Script 7.1 (testsource)
  • Adding things to an array – Script 7.2 (testsource)
  • Using foreach loops – Script 7.3 (testsource)
  • Multidimensional arrays – Script 7.4 (testsource)
  • Sorting an array – Script 7.5 (testsource)
  • Using implode & explode – Script 7.7 (testsource)
  • Creating an array from a form – Script 7.9 (testsource)
    Ch 8 Creating Web Apps & Ch 10 Creating Functions

  • Using headers and footers (demo – source: headerindexfooter)
  • Sticky email form without functions (testsource)
  • Sticky email form with functions (testsource)