Output ASCII Character Strings from PHP Scripts

This section provides tutorial example on how to include output ASCII character strings in a PHP script file. ASCII characters can be entered directly as string literals in PHP code segments or as text in non-PHP code segments. No special techniques are needed.

As I mentioned earlier, ASCII characters can travel from PHP files to browsers easily without any trouble. Here is a simple PHP file with ASCII characters only:

#  HelpASCII.php
#- Copyright (c) HerongYang.com. All Rights Reserved.
   print("This is a very simple help page...<br/>\n");
This is a very simple help page...<br/>

If you view this page with a browser, you will get the following output:

This is a very simple help page...
This is a very simple help page...

Perfect, right? ASCII text entered as a PHP string literal travels through correctly. Text entered as HTML static text outside the PHP block travels through also correctly.

Table of Contents

 About This Book

 Introduction and Installation of PHP 7.3

 PHP Script File Syntax

 PHP Data Types and Data Literals

 Variables, References, and Constants

 Expressions, Operations and Type Conversions

 Conditional Statements - "if" and "switch"

 Loop Statements - "while", "for", and "do ... while"

 Function Declaration, Arguments, and Return Values

 Arrays - Ordered Maps

 Interface with Operating System

 Introduction of Class and Object

 Integrating PHP with Apache Web Server

 Retrieving Information from HTTP Requests

 Creating and Managing Sessions in PHP Scripts

 Sending and Receiving Cookies in PHP Scripts

 Controlling HTTP Response Header Lines in PHP Scripts

 Managing File Upload

 MySQL Server Connection and Access Functions

 Functions to Manage Directories, Files and Images

 SOAP Extension Function and Calling Web Services

 SOAP Server Functions and Examples

Localization Overview of Web Applications

 What Is Localization / Internationalization

 Localization of Web Based Applications

 Character String Traveling Paths

Output ASCII Character Strings from PHP Scripts

 Using Non-ASCII Characters in HTML Documents

 Using Non-ASCII Characters as PHP Script String Literals

 Receiving Non-ASCII Characters from Input Forms

 "mbstring" Extension and Non-ASCII Encoding Management

 Managing Non-ASCII Character Strings with MySQL Servers

 Parsing and Managing HTML Documents

 Configuring and Sending out Emails

 Image and Picture Processing

 Managing ZIP Archive Files

 Managing PHP Engine and Modules on macOS

 Managing PHP Engine and Modules on CentOS

 Outdated Tutorials


 Full Version in PDF/EPUB