Location: PHPKode > scripts > phpWords > phpWordsArabic/lists/php-lib.inc
<?php



function PrintHeader() {

//    header( "Content-type: text/plain" );

    header( "Content-type: text/html" );

}



function PrintHtmlTop( $title ) {

    echo "<html>\n";

    echo "<head>\n";

    echo "<title>$title</title>\n";

    echo "</head>\n\n";

    echo "<body>\n";

    echo "<h2 align=center>$title</h2>\n";

}



function PrintHtmlBottom() {

    echo "</body>\n";

    echo "</html>\n";

}



function PrintArray( $array ) {

    echo "<p>PrintArray $array </p>\n";



//    echo "<p>\n";

    echo "<dl compact>\n";

    

    if ( !empty( $array ) ) {

        reset($array);

        while (list($key, $val) = each($array)) {

//            echo "$key => $val<br>\n";

            echo "<dt><b>$key</b></dt><dd><i>$val</i><br></dd>\n";

        }

    }



//    echo "</p>\n\n";

    echo "</dl>\n\n";

}



function PrintFile( $infile ) {

    echo "<p>The Print Out </p>\n";



    $file = fopen( $infile, "r" );



    if ( !$file ) {

        die( "<p> Error: Unable to open file for read access. </p>\n" );

    }

?>



<div align="left">

<pre>



<?php



    while ( !feof( $file ) ) {

        $line = fgets( $file, 1024 );

        echo $line;

        

        if ( feof( $file ) ) {

            break;

        }

    }



?>



</pre>

</div>



<?php



    fclose( $file );

}



function do_error( $error ) {

	echo "Hmm, looks like there was a problem here...<br>";

	echo "The reported error was $error.\n<br>";

	echo "Best you get hold of the site admin and let her know.";



	die;

}



function getmicrotime(){ 

    list($sec, $usec) = explode(" ",microtime()); 

    return ((float)$usec + (float)$sec); 

} 



?>

Return current item: phpWords