logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Painting
Heart Disease
Horror Literature
Dating
Hiking & Backpacking
SF/Fantasy Books
Healthy Foods


dailyclick
All times in EST

Clairvoyance: 08:00 PM

Full Schedule
g
g PHP Site

BellaOnline's PHP Editor

g

PHP Notices and How To Stop Them

Guest Author - Diane Cipollo

First of all, a notice is not the same as an error message. If your program causes an error message, the program will stop right there and will not finish. However, notices do not stop the program. The notice is printed to the browser and the program continues. There may be times when you want to stop these notices from displaying in the browser.

Here is a common example of a notice that you might get because you tried to use the $string variable that does not exists.

<?php
echo $string;
?>

Notice: Undefined variable: string in C:\sokkit\site\test.php3 on line 2

Perhaps you are working on a program and you want to turn off this notice so you can continue working without recoding this problem area. You can prevent the notice from displaying in the browser by placing an @ sign at the location in the code where the notice would be generated. Just don't forget to go back and recode the problem area later!

echo @$string;


There is more PHP here at BellaOnline--

++Are you interested in learning to program in PHP from the ground up. Learn the basics one step at a time. Check out the PHP Basics articles.

++Are you looking for information about PHP functions. Here are explanations for some of the most frequently used functions.

++Build your own Personal Activities Calendar Program here and learn how the HTML form works with the PHP program.

++Follow these step-by-step tutorials to understand the relationship between PHP and databases.

++Read the latest book reviews on PHP related books.

++Read about online resources for the PHP community.



This site needs an editor - click to learn more!

Add PHP+Notices+and+How+To+Stop+Them to Twitter Add PHP+Notices+and+How+To+Stop+Them to Facebook Add PHP+Notices+and+How+To+Stop+Them to MySpace Add PHP+Notices+and+How+To+Stop+Them to Del.icio.us Digg PHP+Notices+and+How+To+Stop+Them Add PHP+Notices+and+How+To+Stop+Them to Yahoo My Web Add PHP+Notices+and+How+To+Stop+Them to Google Bookmarks Add PHP+Notices+and+How+To+Stop+Them to Stumbleupon Add PHP+Notices+and+How+To+Stop+Them to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the PHP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2013 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor