![]() |
|
#1
|
|||
|
|||
Can't get multiline with heredocI'm working some samples, learning PHP, and I can't get the heredoc construct to output multiline text in the browser.
My samples come from an O'Reilly book and various websites. Am I doing something wrong? I'm a mac newbie doing this in Netbeans on the mac with MAMP 1.8.2 installed. Mamp has PHP 5 with Zend Extensions (don't know what that is). I copied the text for index.php to another editor, thinking it might be something with netbeans, but that didn't help. this code, below, outputs only one line. PHP Code:
the output in the browser looks like this Quote:
|
|||
|
#2
|
|||
|
|||
Re: can't get multiline with heredocQuote:
You created a string and the browser displayed the string. If you want to force parts of the multi-line string to appear on separate lines, you put a "break" tag wherever you need it. For example PHP Code:
Browser should show something like the following: Code:
Regards, Dave Last edited by davekw7x : 04-Oct-2009 at 14:47.
|
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| multiline editbox. | ib_alam | MS Visual C++ / MFC Forum | 1 | 28-Mar-2005 21:17 |
| Please help to solve me a problem with multiline texrbox and checkbox | mithila | MS Visual C++ / MFC Forum | 0 | 08-Sep-2004 23:08 |
| Displaying the \n character in a Multiline Edit Box | sami | MS Visual C++ / MFC Forum | 4 | 05-Aug-2004 04:11 |
| echo <<< HEREDOC doesn't work... | pepee | MySQL / PHP Forum | 14 | 03-Apr-2004 15:44 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The