|
Synopsis This tutorial illustrates the use of a header,body,and footer to explain arrays with hyperlinks programming. In particular the use of hyperlinks associated with an array and/or function shuffle for pictures. Output Buffering(output control) allows you to write and execute your scripts as normal but send data to the web browser at selected times. The main benifit of the system is you can call the header(), setcookies(), and session_start() functions at nearly any spot in your script without concern for the headers already sent error message. At the conclusion of the script call the ob_end_flush or ob_end _clean to send the accumulated buffer to the browser. From a programmers perspective output buffering allows you to structure your script in a more linear form, without concern for HTTP headers. The index.php begins calling the header.inc file which has start output buffering on "ob_start( );" to eliminate any header errors. Important attention is paid to how the $pictures[$i] is escaped from the html code to call the php5 function_shuffle results. In php4 the results were less then desirable. Not working or not efficiently shuffling them in which case the function array_rand( ) will work because your not reordering the entire array. |
Total time used to generate page: 18 ms.