473,508 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Entering a big string as a block...

There was some PHP built in syntax method to enter huge strings as
blocks of text.

I don't remember exactly how it goes and not many people use it, thus,
google search was unsuccessful to me:

$a = [MYKEY]
text text text
[/MYKEY];

Well, it went something like that... Anyone can help me remember
exactly what was the syntax and a correct name of this method?

Aug 20 '06 #1
2 15180
On 20 Aug 2006 11:34:12 -0700, a.********@gmail.com wrote:
>There was some PHP built in syntax method to enter huge strings as
blocks of text.

I don't remember exactly how it goes and not many people use it, thus,
google search was unsuccessful to me:

$a = [MYKEY]
text text text
[/MYKEY];

Well, it went something like that... Anyone can help me remember
exactly what was the syntax and a correct name of this method?
http://uk2.php.net/manual/en/languag...syntax.heredoc

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Aug 20 '06 #2

a.********@gmail.com wrote:
There was some PHP built in syntax method to enter huge strings as
blocks of text.

I don't remember exactly how it goes and not many people use it, thus,
google search was unsuccessful to me:

$a = [MYKEY]
text text text
[/MYKEY];

Well, it went something like that... Anyone can help me remember
exactly what was the syntax and a correct name of this method?
You must be refering to HEREDOC syntax.

echo <<<TOKEN
text $variable "quotes" 'single'

TOKEN;

The ending TOKEN must begin at column one. Any white space before it
will not be stripped out, and PHP will not recognize it as the end of
the HEREDOC block.

Aug 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4760
by: Andrew | last post by:
I have written two classes : a String Class based on the book " C++ in 21 days " and a GenericIpClass listed below : file GenericStringClass.h // Generic String class
9
10770
by: Alfonso Morra | last post by:
I have the following data types: typedef union { long l ; double f; char* s ; void* p ; } Value ; typedef struct {
16
2984
by: Alfonso Morra | last post by:
Hi, I am at the end of my tether now - after spending several days trying to figure how to do this. I have finally written a simple "proof of concept" program to test serializing a structure...
1
1409
by: beachnut | last post by:
Hi, all. This should be pretty easy: When parsing my XmlDocument object with a validating reader, what's the proper way to detect when it "exits" an element's block? It's the first time I've...
6
2214
by: dee | last post by:
Here is a a list of my hyperlinks in my home page: <A class="theclass" href="Default.aspx">Home</A> <A class="theclass" href="Search.aspx">Search</A> <A class="theclass"...
27
2778
by: Madhav | last post by:
Hi all, I did not understand why do the global vars are initialized to NULL where as the block level variables have random values? I know that the C standard requires this as was mentioned in a...
8
3311
by: Alvin | last post by:
I'm making a very simple game in SDL, and I'm not asking for SDL help I hope - this looks like something C++ related, so I'll ask here. I have a class for a simple block, or tile, in the game,...
4
5868
by: dirk | last post by:
Hey, I'm new to php and I'm trying to write some php code so that I can insert data into a mysql database using html forms. I've got two text forms and a submit button. When entering data and...
0
1379
by: chis101 | last post by:
I'm trying to update a SQL Server 2005 database with data entered by the user into textboxes. Here is the code I am using: namespace MLMLocalAdmin { public partial class...
0
7227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.