dumb_question Posted December 13, 2003 Posted December 13, 2003 Hello...I did look the docs and I know where exactly to make changes. But when I make text changes I get parse errors. i want to know if I have to follow any php conventions when completing a line or making a new para. I am totally novice at this. help would be much appreciated. Dumb_Qestion
Spaceboy Posted December 13, 2003 Posted December 13, 2003 Due to my experiences you must always put your text between quotes (like '). And always end your php line with ; . You must understand that the PHP parser (the program that reads your code and tries to separate the PHP commands of your text) searches for PHP tags like ; and '. If you put these in your text then it will be confused. To use these characters you must put a \ (backslash) before the character to indicate to the parser that is NOT a special character but part of your text. Didier. Published modified Contributions
dumb_question Posted December 13, 2003 Author Posted December 13, 2003 hey....thanks ...that was very useful. can you please tell me what i have to do when I create a new a para. Thanks again
gaia Posted December 13, 2003 Posted December 13, 2003 You can either continue the text normally, or concatenate the lines.. here's some examples: define(SAMPLE_A_TEXT, 'This is an example of continuing the text on a separate line. Nothing special is needed here, just be aware that this string is encapsulated by the single quote character. If you need to use a single quote, you will need to escape it, as mentioned before, with a backslash. For example you might do something like: That\'s strange looking.'); define(SAMPLE_B_TEXT, 'In this example, we\'ll concatenate lines like this by using the ' . 'period. The period character can be used to concatenate many strings together, ' . 'as well as using them to include variable. So, to add the first example in this string, ' . 'you would do like so: sample a is ' . SAMPLE_A_TEXT . ' and then continue by concatenating ' . 'again.'); Remember, if you want the line breaks to show up in the web browser, you need to use the <BR> tag. Also, do not use the osC file manager to upload your PHP files, as the escaped single quotes will probably disappear, causing you headaches and parse errors.
dumb_question Posted December 14, 2003 Author Posted December 14, 2003 Thanks guys...appreciate your help Dumb_Question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.