I've never had a problem with how much information a variable can
contain. The way I design my programs, the page gets built up in a
variable and outputted all at once. A quick check of one of my pages
shows just over 37,000 characters.
Perhaps the problem is in how the file() command is reading in the
file. If you are just going to put the array items together, you
might as well just use file_get_contents().
Also, you don't need a loop to join array items into a single string,
use implode().
On Nov 16, 2005, at 9:09 PM, Ron Piggott wrote:
This is a sample of code which takes the $web_page and puts it into
$message
The problem I have is that I have lines in my $web_page files which
are
longer (have more characters) than $message is able to handle and
chunks
of web page text are simply truncated after the character limit has
been
reached. Is there a way to deal with this and allow $message (for
example) to hold 500 or 1,000 characters --- twice of whatever the
default setting is?
Ron
$lineArray = file($web_page);
// make an empty variable first
$message = "";
// concat all array element
foreach($lineArray as $eachLine) {
$message .= $eachLine;
}
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php