PHP 5 for Dummies

15 downloads 174 Views 104KB Size Report
static Web pages, 199, 203 strcasecmp function, 373 strchr function, 87, 373 strcmp function, 373 strcspn function, 373. (string), type casting to a string, 75 strings.
390

PHP 5 For Dummies static Web pages, 199, 203 strcasecmp function, 373 strchr function, 87, 373 strcmp function, 373 strcspn function, 373 (string), type casting to a string, 75 strings adding characters to, 85 built-in functions for, 86–88, 370–375 case of, modifying, 87, 88 comparing, 132 comparing to patterns, 137 concatenating (joining together), 85 converting arrays into, 111–112 converting into arrays, 110–111 counting words in, 86 as data type, 73 escape characters in, 84 formatting for output, 89–92 length of, determining, 87 new line character (\n) in, 82 numbers converted to when formatting, 80 quotes enclosing, 55, 59–60, 82–84 reading entire flat files into, 255 reading parts of flat files into, 253–254 repeating, 87 replacing substrings in, 87–88 returning substrings from, 87–88 reversing, 87 splitting into words, 86 tab character (\t) in, 82 trimming leading and trailing spaces, 86 type casting to, 75 variables in, evaluation of, 82–84 very long (heredoc statement), 81 strip_tags function, 220–222, 373 stristr function, 87, 374 strlen function, 87, 373 str_pad function, 372 strpos function, 87, 373 strrchar function, 373 strrchr function, 87 str_repeat function, 87, 373 str_replace function, 87, 373 strrev function, 87 strrpos function, 87, 373 strspn function, 374 strstr function, 374 strtolower function, 87, 374

strtotime function, 94–95 strtoupper function, 88, 374 strtr function, 374

Structured Query Language. See SQL str_word_count function, 86 style arrays, 18. See also superglobal arrays substr function, 88, 374 substr_count function, 88 substr_replace function, 88, 374 subtraction operator (-), 77 subtraction shortcut operator (-=), 78 superglobal arrays, 18, 123 support, technical. See technical support switch statement, 144–145 Sybase databases, 12, 260, 263 system commands, 13, 286–291, 296 system function, 287, 289 system requirements, 3, 19

•T• tab character (\t), 82 tab-separated values file. See TSV file tags. See HTML tags tarball for PHP installation, 335 tar.gz file, 335 Taylor, Allen (SQL For Dummies), 265 TCP sockets, Net_Socket package for, 309 technical support for database software, 261 for PHP, 10, 16–17, 30 for Web hosting company, 22–23 Telnet server, cURL extension for, 306 tempnam function, 365 text fields, 204–208 $this variable, 185 throw statement, 194 tilde (~), 68 time. See dates and times time function, 359 timestamp, storing in variable, 94–95 Tittel, Ed (HTML 4 For Dummies), 3, 204 tmpfile function, 365 tokenizer extension, 304 touch function, 366 track-vars setting, 125 trans-sid setting in php.ini file, 233, 236–237 trigger_error statement, 71