AW: [PHP-DB] string concatenattion
| From: | Claudia Schasiepen | Date: | Mon, 23 Sep 2002 12:45:35 +0000 |
| Subject: | AW: [PHP-DB] string concatenattion | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21933@lists.php.net to get a copy of this message | ||
Hey,
try
$str = "str.buffer[$i];
since . does the concatenation.
Best regards
Claudia
-----Ursprungliche Nachricht-----
Von: roslyn jose [mailto:roserachjose@yahoo.com]
Gesendet: Montag, 23. September 2002 12:39
An: php-db@lists.php.net
Betreff: [PHP-DB] string concatenattion
hi,
i have an array of strings and would like to create a single string from the
array but starting somewhere in the middle of the array index and not from
the start, is there any function for me to do a string concatenation. ive
gone thro the manula and didnt find any, but if u have any bright ideas how
this can be achieved, pls help.
roslyn
<?php
$conn=pg_connect("host=abcd.... dbname=ucs user=roslyn password=roslyn");
$filename="note.txt";
$fp = fopen ($filename,"r");
$cnt=3;
$buffer=file($filename);
//pg_exec ($conn, "insert into books(name,sequenceno,chapters,lang)
values('$buffer[0]',1,$buffer[1],1)");
$i=2;
while($i <= $cnt)
{
$str = buffer[$i];
$i++;
}
echo $str;
fclose ($fp);
?>
this string only prints the last element in the buffer, and no concat is
done. pls help
---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!