|
| |||||||||
| Tags: cms, php |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| PHP Starter problems
After a period of use of various CMS's, I have begun to recognize the strength of being able to at least basic PHP. I have begun to look at some code that I threw up on my hosting to see what happens. Now, however, I encountered the patrol, and I can not understand what is wrong. The code is extremely small and simple, like my PHP knowledge with other words. The following code generates a "Parse error: syntax error, unexpected T_STRING in *******/ test.php on line 6". PHP Code: |
|
#2
| ||||
| ||||
| Re: PHP Starter problems
$strang1 = This is; $strang2 = string; You do not have " around the text? |
|
#3
| ||||
| ||||
| Re: PHP Starter problems
<? php $strang1 = "This is"; $strang2 = "a string"; $strang3 = $strang1.$strang2; /* This will print: "This is a string" */ echo $strang3; ?> |
|
#4
| |||
| |||
| Re: PHP Starter problems
Of course. Rookie mistake, so the whistle on that ![]() Thanks for the quick help! |
|
#5
| ||||
| ||||
| Re: PHP Starter problems
However, one should be mindful of the difference between using: <?PHP $name = 'Erik'; // With easy fnuttar evaluated and given no value from $name, but printed as just $name echo('Hello $name how are you?'); // Dock double fnuttar echo("Hello $name how are you?"); // To print Hello Erik how are you? out. ?> In other words. Have you no use to evaluate the variables in a string, so use simple fnuttar. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "PHP Starter problems" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Boot-up problems with Windows 7 starter | HarrySkiff | Operating Systems | 1 | 26-08-2011 05:17 PM |
| Office 2010 Starter | spookshow | Guides & Tutorials | 4 | 28-09-2010 02:43 AM |
| Windows7 Starter GPOs? | Gaalib | Windows Software | 3 | 07-08-2010 07:05 AM |
| Starter GPOs | Venkat | Active Directory | 4 | 28-03-2010 09:52 AM |
| Starter GMAT | raven.dauntless | Education Career and Job Discussions | 1 | 22-09-2008 04:19 PM |