Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 









Oracle Database Tips by Donald Burleson


Now that the basics of PHP have been described, useful functions used throughout this book can be revealed. This is in listing form only without much explaining, as this is not a reference book for PHP. The definition of the functions is taken from the PHP on-line manual, without any change.

echo ( string arg1 [, string argn...])

Outputs all parameters.

print ( string arg)

Outputs arg

printf ( string format [, mixed args [, mixed ...]])

Produces output according to format, described in the online documentation for sprintf().

string sprintf ( string format [, mixed args [, mixed ...]])

Returns a string produced according to the formatting string format. The format string is composed of zero or more directives: ordinary characters (excluding %) that are copied directly to the result, and conversion specifications, each of which results in fetching its own parameter. This applies to both sprintf()and printf().

Each conversion specification consists of a percent sign (%) followed by one or more of these elements, in order:

  • An optional sign specifierforces a sign (- or +) to be used on a number. By default, only the - sign is used on a number if it is negative. This specifier forces positive numbers to have the + sign attached as well and is added in PHP 4.3.0.

  • An optional padding specifiersays what character will be used for padding the results to the right string size. This may be a space character or a 0 (zero character). The default is to pad with spaces. An alternate padding character can be specified by prefixing it with a single quote (').

  • An optional alignment specifiersays if the result should be left-justified or right-justified. The default is right-justified; a - character here will make it left-justified.

  • An optional number, a width specifiersays how many characters (minimum) this conversion should result in.

  • An optional precision specifiersays how many decimal digits should be displayed for floating-point numbers. When using this specifier on a string, it acts as a cutoff point, setting a maximum character limit to the string.

  • A type specifiersays what type the argument data should be treated as.  Possible types:

  • % - a literal percent character. No argument is required.

  • b - the argument is treated as an integer, and presented as a binary number.

  • c - the argument is treated as an integer, and presented as the character with that ASCII value.

  • d - the argument is treated as an integer, and presented as a (signed) decimal number.

  • e - the argument is treated as scientific notation (e.g. 1.2e+2).

  • u - the argument is treated as an integer, and presented as an unsigned decimal number.

  • f - the argument is treated as a float, and presented as a floating-point number.

  • - the argument is treated as an integer, and presented as an octal number.

  • s - the argument is treated as and presented as a string.

  • x - the argument is treated as an integer and presented as a hexadecimal number (with lowercase letters).

  • X - the argument is treated as an integer and presented as a hexadecimal number (with uppercase letters).

See code depot for complete scripts

This is an excerpt from the book Easy Oracle PHP.  You can get it for more than 30% by buying it directly from the publisher and get instant HTML-DB scripts from the code depot:

Easy Oracle PHP
Create Dynamic Web Pages with Oracle Data

Includes online HTML-DB code depot

Buy it now for 30% off - Only $19.95

HTML-DB support:

For HTML-DB development support just call to gat an Oracle Certified professional for all HTML-DB development projects.



Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.